I’m using the One Page Navigation Plugin which allows for one menu to control the whole site.
Now I’d like to add a link outside of that menu to link to home also using the scroll effect the scripts provide.
Also using ScrollTo and LocalScroll.
The menu:
<ul id="nav">
<li class="current rotmin"><a href="#one">Home</a></li>
<li class="space"> </li>
<li class="rotplus"><a href="#two" class="menuitem">About</a></li>
<li class="space"> </li>
<li class="rotmin"><a href="#three" class="menuitem">Blog</a></li>
<li class="space"> </li>
<li class="rotplus"><a href="#four" class="menuitem">Contact</a></li>
</ul>
The code:
$('#nav').onePageNav({
currentClass: 'current',
changeHash: false,
scrollSpeed: 1000
});
Someone who can do a better job with the title, please feel free to change it as it’s very unclear, sorry!
To add a item after/outside the
#navYou have tried it with
insertAfter():You also can do it with
after()After that add something thats unset the functionality of the one page navigation.