I am trying to make a new personal website.. The problem is that I am not very skilled with jQuery and I guess I bite off more than I can chew.. http://barnat.php5.cz/new/
What I was trying to accomplish is a combination of these two plugins:
- LavaLamp - http://nixbox.com/projects/jquery-lavalamp/
- jQuery One Page Nav Plugin
It seems to work pretty well, until user scrolls manually to another section. I somehow need to automa开发者_C百科tically highlight correct menu item.. click() is not working correctly (it causes unwanted autoscroll) and mouseover() is not working either, because the original menu item stays selected (not visually, but logically - hightlight returns to the original menu item).
Thanks for any advice.
you must change the 'current' to the current page, e.g:
<!-- the current page is 'home.html' -->
<ul class="lavaLampWithImage" id="1">
<li class="current" ><a href="index.xhtml" >Home</a></li>
<li><a href="systems.xhtml">Systems</a></li>
</ul>
<!-- the current page is 'systems.html' -->
<ul class="lavaLampWithImage" id="1">
<li><a href="index.xhtml" >Home</a></li>
<li class="current" ><a href="systems.xhtml">Systems</a></li>
</ul>
Look the class statement.
精彩评论