Uncaught SyntaxError: Unexpected end of input


#1

I get the unexpected error with this code:

var main = function() {
$('.article').click(function() {
$('.article').removeClass('current');
$('.description').hide();

$(this).addClass('current');
$(this).children('.description').show();

});
$(document).keypress(function(event) {

});

$(document).ready(main);

Am I missing some kind of bracket?


#2

Hi Theantonio,

You forgot to close main(). Try adding a closing curly brace (}) right before $(document).ready(main); :)