我有一个元素会在我单击按钮后出现。我现在想要的是当我的鼠标指针离开元素时隐藏元素。这怎么可能?谢谢
JS脚本:
$(document).ready(function() {
$('.hide').hide();
$('.button').click(function() {
$(this).closest('div').find('.hide').toggle(400);
return false;
});
HTML 代码:
<a class="button" >More</a>
<div class="hide" ><img src="images/icon.png" /></div>
//I want this div hide element to hide after my mouse pointer leave this div area
非常感谢 :D