Unable to open the menu


Exercise 5. Open the menu

Oops, try again. It looks like the '.menu' didn't animate into the screen. Check your $('.menu').animate() function.


Replace this line with your code.

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

  left: '285px'
}, 200);



You are forgetting to properly close the =main= function

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

And then to activate the code of the =main= function

$(document).ready( main );


I did all of this, even down to aligning the indentation exactly as I see in in the "hint" (and not sure why 'body' does not need a '.' for jQuery selection. The menu appears on the right but not when I click on "MENU". I also tried to reset the style.css just in case I accidentally edited it when checking out that page. I cannot figure out what's going wrong.



Play around