当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - Disable Jquery function onclick of scrollbar

问题描述:

I would like to disable the piece of code in the stars in this function when my scrollbar gets clicked by the user.

$(document).ready(function(e) {

$.ajaxSetup({cache:false});

*********setInterval(function() {$('#chatlogs').load('logs.php'); updateScroll();}, 1000);*********

setTimeout(function(){ updateScroll(); }, 1190);

});

It's a chat. When the user clicks the scrollbar in order to check out old messages, I don't want the updateScroll function to be called, which you can see within the stars. Any simple way?

网友答案:

Just remove it....

$(document).ready(function(e) {
     $.ajaxSetup({cache:false});
     setInterval(function() {$('#chatlogs').load('logs.php');  }, 1000); 
     setTimeout(function(){ updateScroll(); }, 1190);                
});
分享给朋友:
您可能感兴趣的文章:
随机阅读: