$(".imgurl").hover(function () {
$(".updatelayer", this).show();
}, function () {
$(".updatelayer", this).hide();
});
好久没碰Juery了,今天写的时候随便找了下居然还有这种写法。
原本 $(".updatelayer").show(); 所有的.updatelayer类都会显示
加上this,$(".updatelayer", this).show(); 只会显示当前鼠标经过的.updatelayer类
比以前方便好多,学习了。