Really need help!


#1

When I run this code , this message comes up. [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.]

I have gone through the instructions hundreds of times but I cannot seem to find the problem

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


#2

HI you should close the if statement with }

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

#7

This topic is inactive.