Interactive website push menu code not working


#1

This is saying my icon menu is not in the main function and as far as I can tell it is. Please help me. And thanks in advance! :slightly_smiling:

var main = function() {
  $('icon-menu');  
};




$(document).ready(main);

#2

Hi Bostonstrong22,

$('icon-menu') selects the nonexistent <icon-menu> HTML element. You need to put a dot (.) it front of it so the computer knows it's a class name, and selects any element with the class="icon-menu" attribute.
That line should look like this:

$('.icon-menu')
// ↑ .

I hope this helps! :slightly_smiling:


#3

thx :slightly_smiling: