我有一個使用jQuery來淡入當鼠標懸停在DIV一個非常簡單的股利。然後當鼠標離開div時,它會淡出。JQuery的淡入/輸出只工作一週時間
我的問題:淡入/淡出只能使用一次。當我把我的鼠標在DIV第二次它不褪色。
請告訴我去錯了嗎?的jsfiddle:http://jsfiddle.net/hWyUn/3/
<div id="test" style="opacity: 0; width: 100px; height: 100px; background-color: red;">
</div>
$("#test").mouseenter(function()
{
$(this).css("opacity","1").fadeIn();
});
$("#test").mouseleave(function()
{
$(this).fadeOut();
});