The Interactive Website course doesn't work!


#1

I was doing the course and I was on the lesson ] where you have to make the menu go back in. In the previous lesson I couldent get menu to go out let a lone in. Anyway It let me carry on and then I couldn't get the menu to go back in so I copied and pasted the hint script in from code academy that they programmed but still came up with an error this is it: "Oops, try again. It looks like the '.menu' didn't animate 285px back to the right. Check your $('.menu').animate() function."

Here is the code from the hint:
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);

});
};

So if you have any ideas of why its doing this or it has happened to you and know how to fix it please help.
Thanks.


#2

@liamla,
Do you have a

$(document).ready(main);

#3

I have and it doesn't work.


#4

@html_lover Please create a new topic with your code, a link to the exercise you're on, and the error message you're getting. Your code is probably different than @liamla's.