Uncaught SyntaxError: missing ) after argument list


#1

Hi - I'm stuck on the 'Interactive Website: Push Menu' section.

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

It keeps coming up with an error message (as shown in the topic - 'missing ) after argument list'.

Any ideas?


var main = function() {
$(".article").click(function() {
    $(".article").removeClass("current");
    $(".description").hide();
    
    $(this).addClass("current");
    $(this).children("description").show();
    
}); 
$(document).keypress(fucntion(event) {
    if(event.which === 111) {
        $(".current").children(".description").toggle();
    }
});
$(document).ready(main);


#2

Hi you ddin't close the main function and this line

$(document).keypress(fucntion(event)

you wrote fucntion instead of function


#3

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