function scroll(element, speed) {
element.animate({ scrollTop: $(document).height() }, speed, function() {
$(this).animate({ scrollTop: 0 }, speed, scroll(element, speed));
});
}
scroll($('html, body'), 1000);
^This is the code I"m running, and it scrolls the entire html view, however I want it to scroll only the twitter widget on my site. I tried doing.
scroll($('html, .twitter-timeline'), 1000);
scroll($('html, iframe'), 1000);
等。不知道如何选择twitter iframe,哪个类或id负责滚动,所以我可以选择它?