treehouse : what would you like to learn today?
Web Design Web Development iOS Development

javascript driven navigation menu on footer

  • My navigation menu on header looks like this:
    <ul id="nav">
    <li id="home">
    <a class="mainmenu" href="#">Link1</a>
    </li>

    <li>
    <a class="mainmenu" href="#">Link2</a>
    </li>


    </ul>

    and the same markup is used for the footer section and it's not working. I have also a file called jscript.js which contains all the javascript for the website, and I found this variable:
    var navTarget = "ul#nav li a" //menu link to target 


    Also, if I remove for example the markup in the header sections the footer will work. I've tried also to use .nav instead of #nav and I have the same problem.

    The navigation menu is controlled by javascript, I don't post the code here because it's huge, for better understanding of how the navigation menu works look here
  • i don't understand.