I'm allowed to complete the course, but can't open the menu


#1

Hi there,

I'm having a similar experience, but I don't see a parantheses or brace order error in my code. I'm also allowed to complete the course, but can't open the menu. Help?

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

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

7/8 Lets me complete the course but the menu won't work!
#2

Hi @sarajanekoste,

You should only have one main function. Take the code from the second, then put it inside the first, and delete the second main function :slight_smile: