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);
atď. Nie ste si istí, ako vybrať iframe na twitteri, ktorá trieda alebo ID je zodpovedné za rolovanie, aby som ho mohol vybrať?
odpovede:
0 pre odpoveď č. 1http://imgur.com/HNjYxRF ^ Tu je screenshot nástrojov pre vývojárov. Skúšal som to zmeniť aj tak, aby sa vybralo ID dátového widgetu.