开发者

Problem with Lavalamp and One Page Navigation combination

开发者 https://www.devze.com 2023-03-12 20:21 出处:网络
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/

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号