Skip to main content
1 of 2
removed
  • 111
  • 4

I've noted some details, let me explain:


  1. CSS Selectors. jQuery allows you to use them too:

    $("[id^='content-wrap']") --> will select all elements which id starts with 'content-wrap'


  1. Substring is an available method of JavaScript:

    var number = "navItem15".substring(7); // will return what is after position 7.. // resulting the number "15"


  1. To start your menu with the first position. This is the best way:

    (function(){ $("#navItem1").trigger("click"); })(); // using this approach, you won't need copy your code into a function as you did // this approach triggers the "click" event in the first menu automatically


Well, hope you got it!

Nice coding!

removed
  • 111
  • 4