N shortcut 2 error no help found


#1

I need help with:
https://www.codecademy.com/courses/web-beginner-en-4hxyb/0/9?content_from=make-an-interactive-website%3Ajquery-events

it keeps saying th N key does nothing and that there is a missing ) but i cant see where and no mather where i add it it says there is an unepected )

my code is:

var main= function(){
 $('.article').click(function() {
     $('.article').removeClass('current');
    $('.description').hide();
    
    $(this).addClass('curent');
     $(this).children('description').show();
     $(document).keypress(function(event){ 
        if(event.which === 111) {
            $('.current').children('.description').toggle();}
            else if(event.which === 110){
            var currentArticle = $('.current');
            var nextArticle = currentArticle.next();
            currentArticle.removeClass('.current');
            nextArticle.addClass('.current');
            
            };
 });
};


$(document).ready(main);

If you see anything wrong please let me know :-: I really appreciate it


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.