SyntaxError: missing ) after argument list


#1

I am doing the Interactive Website: Push Menu exercise, and I keep getting the "Way to go!" thing on each page. However...when I click on the Menu icon, nothing happens. For most of the pages in this exercise, I have gotten a "SyntaxError: missing ) after argument list" error in red underneath the preview window. What am I doing wrong? Here is my code on the app.js tab:

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


#2

I was exploring on other forums, and I tried something else. The error I get now is: SyntaxError: missing } after property list

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

So what am I doing wrong now?


#3

Hi Shawn,

Which exercise are you on?


#4

I was on the Interactive Website: Push Menu exercise, but I got it figured out. I found the solution on another thread. Thanks though!