(最初は私の英語でごめんなさい)!jquery ホバーの問題があります。私はナビゲーションを持っており、マウスがいくつかの要素(プレーヤーとログインボタン)の上にある場合、対応するdivをjquery show()します。それはうまくいきますが、対応するdivにカーソルを合わせると、divは非表示になりますが、そのままにしておく必要があります。
ナビゲーション要素:
<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>
誰かが私を理解してくれることを願っています...助けてくれてありがとう