【发布时间】:2016-09-16 08:18:44
【问题描述】:
我已经有单独的自动刷新代码和自动滚动代码。
我希望它们在一个功能中...我该怎么做?
这是我的自动刷新
代码var auto_refresh = setInterval(function ()
{
$('#load_tweets').load('http://myayg.com/index.php?route=salesTracker2.results').fadeIn("slow");
}, 10000);
还有我的自动滚动
function scroll(speed) {
$('html, body').animate({ scrollTop: $(document).height() }, speed, function() {
$(this).animate({ scrollTop: 0 }, speed);
});
}
speed = 30000;
scroll(speed)
setInterval(function(){scroll(speed)}, speed * 2);
我希望它们在一个脚本中...我该怎么做?
【问题讨论】:
标签: javascript php autoscroll