Uncaught SyntaxError: Unexpected token )


#1

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

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

};

$(document).ready(main);

this seems to be correct to me?


#2

"The only way to learn anything is to be confronted by our own misconceptions." Prof. Lawrence Krauss

Compare your code to the following:

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

#3

Ah shucks, });

I think that was the problem, thanks :smile: