熔岩灯菜单不起作用

发布于 2024-11-05 18:00:29 字数 661 浏览 3 评论 0原文

我下载了一个名为“熔岩灯菜单”的菜单,它是基于jquery的,也许你们中的一些人听说过它。我已经配置了&按照我想要的方式设置它的样式,但它不会链接到指定的页面。这是唯一的问题,因为它的动画正如我想要的那样,但它不会链接。我已经做了一些研究&当我在此脚本中将“false”更改为“true”时

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

,它链接到适当的链接,但背景不会突出显示活动菜单项。有一个文件创建动画,将“当前”类分配给第一个LI 因此 bg 图像返回到此菜单项。任何人都知道可能是什么问题?哦,我也有 jquery 无冲突模式,因为我有一些正在使用 motools 的模块最初与代码冲突,但是现在他们似乎一切都很好。 提前致谢。

I have this menu called "lava lamp menu" 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

記憶穿過時間隧道 2024-11-12 18:00:29

猜测点击事件附加在链接上。当返回 false 时,它​​会取消链接单击,因此不会继续进入该页面。

如果您需要在下一页上突出显示菜单项,则需要将默认情况下使其选中的任何类添加到元素中。

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.

缱倦旧时光 2024-11-12 18:00:29

谢谢 epascarello 但它可以解决这个问题。你是对的,我必须附加“current”类,它负责用 bg 突出显示菜单项。该网站本身是一个 joomla one & 。我注意到它为活动菜单项生成一个类,我所要做的就是将“活动”类更改为“当前”&就做到了。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文