0
简单的jQuery绑定函数为我调用了两次,我也在使用jQuery移动时也看到了这个问题。jquery绑定不止一次被调用
$(document).ready(function(){
$(window).bind("resize",function(){
$("#length").text($(window).width());
$("#length").show("slow");
$("#length").hide("slow");
});
});
<html>
<body>
<div id='length' style= display:none></div>
<div class="font size">1</div>
</body>
</html>
问题的原因? – sij
Here you go:http://stackoverflow.com/questions/5534363/why-does-the-jquery-resize-event-fire-twice – kayen