简单易用的jQuery 版仿新浪微博 向下滚动效果(附DEMO)

 jquery版,简单易用的jQuery 版仿新浪微博 向下滚动效果,

现在越来越发现jquery太强大咯,哈哈。。

本文来自:合肥网产品小组

先上核心代码:

$(function(){
var scrtime;
$("#con").hover(function(){
clearInterval(scrtime);
},function(){
scrtime = setInterval(function(){
var $ul = $("#con ul");
var liHeight = $ul.find("li:last").height();
$ul.animate({marginTop : liHeight+40 +"px"},1000,function(){

$ul.find("li:last").prependTo($ul)
$ul.find("li:first").hide();
$ul.css({marginTop:0});
$ul.find("li:first").fadeIn(1000);
});
},3000);
}).trigger("mouseleave");
});
</script>

代码其实比较简单。。
大家也可以看看我们的合肥网微薄

原文地址:https://www.cnblogs.com/jincon/p/1954014.html