Menu works, but doesn't let me pass - what's wrong?


#1

Hello!
This is my code.
Like this it works but if I click "save and submit" finds this error: Oops, try again. Add code for $('body').animate();. Look back at the instructions for the code.

If I took out the line number ten (10) menu does not work but I am able to click "save and submit" and go forward

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

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

}); //line number ten (10)//

};

$(document).ready(main);


8/8 "Congratulations!" Let me pass, yet the menu does not work
#2

@silvestrovicino

You can't have a space there, and same for the other place in your code with the same problem. It should look like this instead:

  $('body')
// ↑ no space here

:slightly_smiling:


#3

@silvestrovicino

I think you should remove the space between $ and ('.icon-menu')


#4

Thank you to both! :grinning: