The o shortcut problem


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

    
    
  }

)};
};

$(document).rea

Can someone tell me where the problem is,I am not able to solve this problem


Replace this line with your code.


#2

HI this line

$('.article').removeClass('.current');

you should use the name of teh classe which is current without the dot liek that

$('.article').removeClass('current');

and the keypress fnnction

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

you should close the keypress like that }); instead of )};

});

then this line

$(document).rea

shoudl be

$(document).ready(main);