This question shows research effort; it is useful and clear
0
This question does not show any research effort; it is unclear or not useful
Bookmark this question.
Show activity on this post.
$(this)在下面的情况下,我怎样才能setTimeout获得悬停功能的选择器img。
$("img").hover(function(){
window.setTimeout(function() {
$(this).addClass("hovering"); // add class .hovering to the exact img being hovered
}, 500);
});
$("img").hover(function() {
var $this = $(this);
window.setTimeout(function() {
$this.addClass("hovering"); // add class .hovering to the exact img being hovered
}, 500);
});