[英]How to target anchor 'Hover' event like in css a:hover in jQuery
hover()
bind two handlers to the element. hover()
将两个处理程序绑定到元素。 One for mouse pointer enters and another for leaves the element.一个用于鼠标指针进入,另一个用于离开元素。 Try like following
尝试如下
$('.wrap div').hover(function () {
$(this).find('a').addClass('active');
}, function () {
$(this).find('a').removeClass('active');
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.