以下有什么区别?
$(document).on("scroll",".wrapper1", function(){
$(".wrapper2")
.scrollLeft($(".wrapper1").scrollLeft());
});
$('.wrapper1').on("scroll", function(){
$(".wrapper2")
.scrollLeft($(".wrapper1").scrollLeft());
});
Run Code Online (Sandbox Code Playgroud)
什么时候应该准确使用每个功能?
jquery ×1