输入banner图图片脚本导航/分类

jquery无缝向上滚动实现代码_jquery

JS部份
代码如下:

$(function(){
var $this = $(".renav");
var scrollTimer;
$this.hover(function(){
clearInterval(scrollTimer);
},function(){
scrollTimer = setInterval(function(){
scrollNews( $this );
}, 2000 );
}).trigger("mouseout");
});
function scrollNews(obj){
var $self = obj.find("ul:first");
var lineHeight = $self.find("li:first").height();
$self.animate({ "margin-top" : -lineHeight +"px" },600 , function(){
$self.css({"margin-top":"0px"}).find("li:first").appendTo($self);
})
}

HTML部份
代码如下:




  • 罗氏

  • 瑞声达

  • 未添加1

  • 未添加2

  • 未添加3

  • 未添加4

  • 西门子

  • 欧姆龙