0
我试图在光标移动到元素时保持切换的元素可见。如果光标位于打开的元素内,则保持元素处于打开状态
我的代码是现在:
<div class="infobox">
<i class="icon-info-sign"></i>
<div class="infobox_content" style="display: none;">
Content
</div>
</div>
有了这个JavaScript/jQuery的
$("div.infobox i.icon-info-sign").hover(
function() {
$(this).parent().find(".infobox_content").stop(true).show("slow");
},
function (e) {
$(this).parent().find(".infobox_content").stop(true).hide("slow");
}
);
我如何检测出光标已移动到.infobox_content
?如果是这样,我需要让元素保持打开状态,并且只能在.infobox_content
之外再次隐藏元素。
这工作就像一个魅力。那里没有其他元素。感谢您及时的回复。简单而聪明:-) – janhartmann 2013-03-10 13:17:50