Interactive website: #3-Dropdown Menu exercise


Having a little trouble getting started here. Any help/fresh set of eyes greatly appreciated.

Here's what's needed:
Use jQuery to select the More link. This involves the 'dropdown-toggle' class. Add a .click() with a function inside. This function is called a click event handler.

Inside the event handler:
a. Use jQuery to select the 'dropdown-menu' class.
b. Then make the menu show and disappear using .toggle().

Here's my code:

var main = function() {
$('.dropdown-toggle').click(function() {

Here's the error message I get: Oops, try again.
It looks like the dropdown menu isn't showing after clicking on More
navigation element. Remember to toggle the dropdown menu inside the
event handler.

Any ideas?


Hi Julienk403,

I think you forgot to call main once the page has loaded. Do you know how to do that?


You can do that with this:


In this case, you would substitute function for main :)


Thanks! This worked. I didn't know you didn't need to add 'main' there.


3 posts were split to a new topic: Glitch In the Codecademy API?


3 posts were split to a new topic: I Can't Find the Issue With My Code


2 posts were split to a new topic: Could Someone Help Me With My Code?


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.