为什么当我点击Scroll-Up&向下滚动按钮页面滚动停止

时间:2016-11-26 02:14:50

标签: jquery

此Html代码



<div id="scroll-down">
<i  class="fa fa-angle-double-down fa-5x wow      bounceIn"       data-wow-delay="2s"></i>
</div>

<div id="scroll-up">
            <i class="fa fa-arrow-circle-o-up fa-2x" aria-         hidden="true"></i>
</div>
&#13;
&#13;
&#13;

为什么当我点击Scroll-Up&amp;向下滚动按钮页面滚动停止
这个jQuery代码:

&#13;
&#13;
$(window).scroll(function () {
        $('#scroll-down').click(function(){
           $('html,body').animate({scrollTop : '632'},800); 
        });
        
        var scrollUp=$('#scroll-up');
        if(st>=1000) {
            scrollUp.fadeIn(600);
        }else{
            scrollUp.fadeOut(600);
        }
        
        scrollUp.click(function(){
           $('html,body').animate({scrollTop : '0'},800); 
        });  
});
&#13;
&#13;
&#13;

0 个答案:

没有答案
相关问题