Code Editor accepts work, menu doesn't work and talks about uncaught syntax error


#1

var main = function() {
$('.icon-menu');.click(function() {
$('.menu').animate({
left: '0px'
}, 200);

$('body').animate({
  left: '285px'
}, 200);

});

$(' .icon-close').click(function() {
$('.menu').animate({
left: "-285px"
}, 200);

$('body').animate({
left: "0px"
}, 200);
});
};

$(document).ready(main)

Through out the whole exercise when building the code up using the instructions given, the push out menu would never come out. It would accept my work as correct but never open the menu. It gave me an error that read uncaught syntax error: unexpected token.


#2

The error appears to be here $('.icon-menu');.click(function() { <- extra ";" before .click


#3

Thank you for the swift answer.


#4

hey am creating an interactive web site and need can you act up on request :expressionless:


#5

Hey @blogninja56112,

Please create a new topic with your code, the error message you're getting, and the link to the exercise you're on, and someone will help you over there :)