开发者

lava lamp menu won't work

I have this menu called "lava lamp menu"开发者_C百科 that i downloaded which is based on jquery, maybe some of you have heard of it.I have configured & styled it as i want it but it won't link to the specified pages.That's the only problem because it's animating just as i wanted it to but it won't link.I have done some research & when i chnge the "false" to "true" in this script

    <script type="text/javascript">
        $(function() {
            $("#2").lavaLamp({
                fx: "backout", 
                speed: 700,
                click: function(event, menuItem) {
                    return false;
                }
            });
        });
    </script>

it links to the appropriate link but the background won't highlight the active menu item.There is a file that creates the animation that assigns a "current" class to the first LI and thus the bg image goes back to this menu item.Any one with some clue what could be the problem??Ooh also i have the jquery no conflict mode as i have some modules that are using motools that were conflicting with the code initially but now they seem to be just fine. Thanx in advance.


Guessing that the click event is attached to the links. When false is returned it cancels the link click so it will not continue onto the page.

If you need the menu item to be highlighted on that next page, you need to add whatever class that makes it selected to the element by default.


Thanx epascarello but it work around it.you are right i had to attach the class "current" which is responsible for highlighting the menu item with the bg.The site itself was a joomla one & i noticed that it generates a class for the active menu item, all i had to do is change the "active" class to "current" & that did it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜