7 whats wrong with my code?


#1

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();
    
    }

});
};

hey guys can someone show me in a simple way what's wrong with my code?
thank you!


#2

this is the message i keep getting:

" Oops, try again. It looks like the o key isn't opening a description. Remember to toggle the current article's description inside the event handler. Look back at the instructions for the code.

"


#3

I would like to move your question to the correct category. Please post a link to the exercise.