Need help on "The O Shortcut"


#1

I keep getting the same error message for the o shortcut.
var main = function() {
$('.article').click(function() {
$('.article').removeClass('current');
$('.description').hide();

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

});
$(document).keypress(function(event) {
if(event.which === 111) {
$('.current').children('.description').toggle();
}
});

$(document).ready(main);


Need help on "The O Shortcut"
The o shortcut
#2

@pgoodman123 Close your main function with a closing curly brace (}) on the next to last line.


#3

I added the curly brace as instructed...screen shot below.

Thank you for your time.


#4

I added the curly brace as instructed. screen shot below.

Thank you for your time.


#5

@pgoodman123 Remove line 3; what's it doing there?
Then, compare the syntax difference between lines 4 and 7. Line 4 uses the correct syntax, and line 7 won't work the way it is, so make it look like line 4, syntax-wise.