このインフォボックスは、そのインフォボックスに接続された矢印にカーソルを合わせるとスライドして表示されます。詳細については、さらに下にリンクした jsfiddle を参照してください。
私が苦労しているのは、それがちょっと遅いということです。それは好きなように非常に速く前後にジャンプし、私をとても悩ませます. 私はいくつかの調査を行い.stop(true, false)
、それがそれを台無しにするものであることがわかりましたが、それなしでは本当に行くことはできません. しかし、まだスムーズな解決策は見つかりませんでした...
できればお願いしたいのですが...
...ホバーすると、マウスが離れてもアニメーションを完全にアニメーション化します。
...
#infoboxArrow
マウスがホバーされたときにアニメーション化し、マウスがその親を離れたときにアニメーション化します#infocontainer
。
$('#infoboxArrow').hover(function() {
$('#infocontainer')
.stop(true, false)
.animate({
right: 250
}, 600);
}, function() {
$('#infocontainer')
.stop(true, false)
.animate({
right: 0
}, 600);
});
#infocontainer{
position:fixed;
background-color: blue;
top: 0em;
right: 0em;
}
#infoboxArrow {
display: inline-block;
background-color: pink;
margin-bottom: 10.1325em;
margin-top: 10.1325em;
height: 7.735em;
}
#infoboxDiv{
display: inline-block;
background-color: yellow;
width: 400px;
height: 28em;
position: absolute;
}
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<div id="infocontainer" class="slideOutTab">
<div id ="infoboxArrow" class="slideOutTab"><img src="http://i61.tinypic.com/qmx8ns.png"/></div>
<div id="infoboxDiv" class="slideOutTab"></div>
</div>