【问题标题】:Superfish adding hover class to parent item in Concrete5 Edit ModeSuperfish 在 Concrete5 编辑模式中将悬停类添加到父项
【发布时间】:2013-08-30 02:26:24
【问题描述】:

我正在 Concrete5 CMS 上开发一个网站。我已经设置了一个超级鱼菜单,并且一切正常……当我不处于“编辑模式”时。

这是我的代码:

$('.breadcrumb-nav .inner > ul').superfish({
    hoverClass:    'sfHover',          // the class applied to hovered list items
    delay:         500,                // the delay in milliseconds that the mouse can remain outside a submenu without it closing
    animation:     {opacity:'show'},   // an object equivalent to first parameter of jQuery’s .animate() method. Used to animate the submenu open
    animationOut:  {opacity:'hide', height: 'toggle'},   // an object equivalent to first parameter of jQuery’s .animate() method Used to animate the submenu closed
    speed:         'fast',           // speed of the opening animation. Equivalent to second parameter of jQuery’s .animate() method
    speedOut:      'fast',             // speed of the closing animation. Equivalent to second parameter of jQuery’s .animate() method
    cssArrows:     true               // set to false if you want to remove the CSS-based arrow triangles
});

--

当我不编辑页面时,superfish 的工作方式如下:

将鼠标悬停在.breadcrumb-nav .inner > ul > li 上会将sfHover 类添加到.breadcrumb-nav .inner > ul > li。 - 正如人们所期望的那样

--

当我处于编辑模式时,由于某种原因会发生这种情况:

将鼠标悬停在.breadcrumb-nav .inner > ul > li 上会将sfHover 类添加到.breadcrumb-nav .inner > ul。 - 父项而不是单个列表项。

--

我希望有人能对这个问题有所了解。我目前无法提供链接,但我会在网站上线后提供。

谢谢!

【问题讨论】:

    标签: jquery css hover superfish concrete5


    【解决方案1】:

    我不确定,但有可能您正在使用的类名也被 C5 在编辑模式下添加的某些内容所使用?也许尝试更改您的类名(在您的导航菜单标记、CSS 和 superfish 初始化 javascript 代码中)——例如将.breadcrumb-nav 更改为.site-breadcrumb-nav(只是一个示例)。 C5 通常在不污染类名方面做得很好(大多数 C5 添加的东西都以ccm- 为前缀),但有时可能会漏掉一些东西。

    【讨论】:

    • 感谢您的建议。我不认为这可能是我的问题。我仔细检查以防万一。我现在有一个在线开发副本的链接。如果你有兴趣看看我可以为你提供一个链接。告诉我。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-05-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多