我有一个单击按钮后会出现的元素。我现在想要的是当我的鼠标指针离开元素时隐藏元素。这怎么可能?由于JS当鼠标离开内容区域时隐藏html内容
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
检查更新的答案。 – 2013-05-09 08:16:25