0
我很久没有更新我的网站,并且最近才注意到我的推文没有在我的网站上发生变化,而是正在加载......很多人都说使用Twitter小部件,但我想知道是否JQuery中有另一种方法吗?如何在我的网站上显示我的最新3条推文?
这是我使用的代码:
<script type='text/javascript'>
jQuery(function($){
$("#ticker").tweet({
username: "username example",
page: 1,
avatar_size: 32,
count: 10,
loading_text: "loading ..."
}).bind("loaded", function() {
var ul = $(this).find(".tweet_list");
var ticker = function() {
setTimeout(function() {
ul.find('li:first').animate({marginTop: '-4em'}, 500, function() {
$(this).detach().appendTo(ul).removeAttr('style');
});
ticker();
}, 5000);
};
ticker();
});
});
</script>