Item with no children list doesn't hide sibling lists

1 view
Skip to first unread message

altrugon

unread,
May 18, 2010, 2:00:31 PM5/18/10
to jquery
<p>Hi there,</p>

<p>Taking the following list as example:</p>

<blockquote>
<div class="wbq">
<ul>
<li>Item 1

<ul>
<li>Item 1.1</li>

<li>Item 1.2</li>
</ul>
</li>

<li>Item 2</li>

<li>Item 3

<ul>
<li>Item 3.1</li>

<li>Item 3.2</li>
</ul>
</li>
</ul>
</div>
</blockquote>

<p>I have noticed that when you hover Item 2, which doesn't have
children, the fired event doesn't hide any of the other children list.
I've dig a little bit in the code and I found the following lines in
superfish.js:</p>

<blockquote>
<div class="wbq">
<p>$('li:has(ul)',this)[($.fn.hoverIntent &amp;&amp; !
o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function()
{<br>
if (o.autoArrows) addArrow( $('&gt;a:first-child',this) );<br>
})<br>
.not('.'+c.bcClass)<br>
.hideSuperfishUl();</p>
</div>
</blockquote>

<p>Removing the 'has(ul)' from the selector makes the trick but I'm
wondering if this is the right way to solve this problem or if this is
not even a bug.</p>

<p>Can you please check this behaviour?</p>

<p>Just in case this is relevant the style that I'm using is 'default'
and the menu type is 'NavBar'.</p>

<p>Thank you very much, and nice work.</p>

--
您收到此邮件是因为您订阅了 Google 网上论坛的“jquery”论坛。
要向此网上论坛发帖,请发送电子邮件至 jqu...@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 jquery+un...@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/jquery?hl=zh-CN 访问此网上论坛。

Reply all
Reply to author
Forward
0 new messages