此处显示的脚本在链接处有效,但在我放入网站时无效,有什么问题?http://jsfiddle.net/QUCWe/
//<![CDATA[
$(window).load(function(){
function scroll(speed) {
$('html, body').animate({ scrollTop: $(document).height() - $(window).height() }, speed, function() {
$(this).animate({ scrollTop: 0 }, speed);
});
}
speed = 1000;
scroll(speed)
setInterval(function(){scroll(speed)}, speed * 2);
});//]]>