Javascript Jquery在滚动后更新dom
类jquery悬停函数在滚动后工作Javascript Jquery在滚动后更新dom,javascript,jquery,html,Javascript,Jquery,Html,类jquery悬停函数在滚动后工作 $(document).ready(function() { $('img').hover(function(){ alert('hello'); },function(){ alert('hello not'); }); }); 在第一个站点上加载的悬停图像显示警报hello,但在滚动图像加载(lazzy加载)之后。悬停这些图像时,不会显示警报 您需要授权: $(document).ready(fun
$(document).ready(function() {
$('img').hover(function(){
alert('hello');
},function(){
alert('hello not');
});
});
在第一个站点上加载的悬停图像显示警报hello,但在滚动图像加载(lazzy加载)之后。悬停这些图像时,不会显示警报 您需要授权:
$(document).ready(function() {
$(document).hover('img', function(){
alert('hello');
},function(){
alert('hello not');
});
});
$(document).ready(function() {
$("body").on("mouseenter", "img", function(){
alert('hello');
});
$("body").on("mouseleave", "img", function(){
alert('hello not');
});
});
用于动态元素。。。