Unable to open the menu


#1


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() {
$('.menu').animate({
left: '0px'
}, 200);

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

});


#2

@systemwhiz65855,
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 );

#3

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.


#4

@eappatt

https://learn.jquery.com/using-jquery-core/selecting-elements/
https://api.jquery.com/category/selectors/
http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
http://www.w3schools.com/jquery/jquery_ref_selectors.asp
Play around
http://www.w3schools.com/jquery/trysel.asp