6.0 menu not functioning


#1

I am currently on 6/8 of the "Interactive Website: Push Menu" and despite having received a "Way to go" on the previous section (5/8), the push menu does not work. (I received the same problem on 5/8)
The code is as following:
var main = function() {
$('.icon-menu').click(function()
$('.menu').animate({
left: '0px'
}, 200);

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

And I have this error: Uncaught SyntaxError: Unexpected identifier
Anyone know why?
Apologies if this problem has already been covered!
:no_mouth:
Cheers!


#2

Hi Classographic,

You need to open your function, by adding an opening curly brace ({) at the end of that line.

That selects an element with the class="body" attribute, but you need to be selecting the HTML <body> element, so remove the dot (.).

I hope this helps! :slightly_smiling:


#3

A post was split to a new topic: Wrong default code in exercise 6