Why isn't this letting me go further? (7/8)


#1

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

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

};

$(document).ready(main);

The error I'm getting is:"Oops, try again. Remember to add code for $('.menu') inside $('.icon-close').click(). Look back at the instructions for the code."
It friggin' is INSIDE the $('.icon-close').click() function! And why is the first working and I'm just getting an error for the second???


#2

Hi Diana,

Which exercise are you on?


#3

Right, sorry, I'm new to the discussion panel.
I'm on 7. Close the Menu


#4

It's fine :)
Your code works for me, so I suggest refreshing the page and switching browsers.
I did spot a small problem though, on line 4 you should be pushing the body left by 285px, not 245px.