(開始抱歉我的英語)! 我有一個jQuery懸停問題。 我有一個導航,如果鼠標懸停一些元素(播放器和登錄按鈕)jquery show()相應的div。工作正常,但當我懸停相應的div div隱藏,但應該留下。jquery懸停在懸停內
Navigatin元素:
<li class="hover" title="login"><img src="images/nav-log.png" alt="player" border="0" /></li>
<li class="hover" title="player"><img src="images/nav-ply.png" alt="player" border="0" /></li>
的jQuery:
var playerstat = 0;
$(".hover").mouseover(function() {
link = $(this);
layer = $("#" + link.attr("title") + "_content");
position = link.position();
link.attr("id","aktiv");
if(link.attr("title") == "player" && playerstat == 0){
link.click(function() {
});
}
layer.css({
top : ($("html, body").scrollTop() + position.top + $(this).height() + 3) + 'px',
left : (position.left - layer.outerWidth() + link.width()) + 'px'
});
layer.show();
layer.mouseover(function() {
alert("over");
link.attr("id","aktiv");
$(this).show();
}).mouseleave(function(){
link.attr("id","");
$(this).hide();
});
}).mouseout(function(){
link.attr("id","");
$("#" + $(this).attr("title") + "_content").hide();
});
玩家:
<div id="player_content" class="theme-gradient theme-shadow">
<span id="track-info" class="theme-fontbggrey"></span>
<span id="player-layer"></span></div>
我希望有人理解我......謝謝你幫我
狀層= $( 「#player_content」); ? – fteinz
不爲我工作 – fteinz