Stopping jQuery from doing its thing?

前端 未结 5 1742
渐次进展
渐次进展 2021-01-14 19:52

I have this code.

$(document).ready(function() {
$(\'#box\').hide();
$(window).bind(\'scroll\', function(){
    if($(this).scrollTop() > 200) {
        $(         


        
5条回答
  •  -上瘾入骨i
    2021-01-14 20:41

    jQuery has a stop() method - http://api.jquery.com/stop/

    This article describes how to use it, seems to be exactly what you're looking for: http://www.learningjquery.com/2009/01/quick-tip-prevent-animation-queue-buildup

提交回复
热议问题