This java script lesson's dropdown menu is not showing. What is the issue with my code? I followed all of the instructions


#1


#2

Hi Kai,

Are you clicking directly on the “Flipboard” between the logo and the ▼?


#3

I had the exact same issue. Tried in different browsers too.

Edge, Chrome, IE, Safari.

I moved on but the issue still remains on most of the course (Make an Interactive Website) it seems.

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

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

};

$(document).ready(main);

I get: Expected ':'

and as with the Flipboard the menu won't appear. (although it did in the introduction)


#4

Works

var main = function() {
/* Push the body and the nav over by 285px over */
$('.icon-menu').click(function() {
$('.menu').animate({
left: "0px"
}, 200);

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

});

/* Then push them back */
$('.icon-close').click(function() {
$('.menu').animate({
left: "-285px"
}, 200);

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

});
};

$(document).ready(main);

Doesn't Work

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

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


$('.icon-close').click(function() {
    $('.menu').animate({
        left: "-285x"
    }, 200);

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

};

$(document).ready(main);