Jquery mCustomScrollbar滚动底部
我对McCustomsCrollbar有问题,这是我的代码,但它不起作用Jquery mCustomScrollbar滚动底部,jquery,jquery-plugins,scroll,scrollbar,Jquery,Jquery Plugins,Scroll,Scrollbar,我对McCustomsCrollbar有问题,这是我的代码,但它不起作用 function createChat(){ $("#chatview").load("chat/refresh.php",function(){ $(this).mCustomScrollbar("scrollTo", "bottom"); }); } $(window).load(function(){ setInterval("createChat()",9000);
function createChat(){
$("#chatview").load("chat/refresh.php",function(){
$(this).mCustomScrollbar("scrollTo", "bottom");
});
}
$(window).load(function(){
setInterval("createChat()",9000);
createChat();
});
我会尝试将插件附加到chat view元素:
//cache variable
var $chatView = $("#chatview");
function createChat(){
$chatView.load("chat/refresh.php",function(){
$chatView.mCustomScrollbar("scrollTo", "bottom");
});
}
$(window).load(function(){
setInterval("createChat()",9000);
createChat();
});
感谢您提供此解决方案,但它仍然不起作用:)无法了解原因:)