html**
一周精選
js**:
/*
components.scrollimg:無縫迴圈滾動類
@版本:components.scrollimg_v1.0
@具體使用方法見金互通前端元件庫幫助文件.doc
*/function componentsscrollimg(animateobj, currentobj, clonewrapobj, animatestep, childlength, option);
if(typeof(option) == "object")
} $(this.clonewrapobj).html($(this.currentobj).html());
if(this.childlength % this.option.everyimglength == 0)
else
//初始化滾動動畫
this.init = function()
if(this.option.control)
this.cleartimer(this.animateobj, this.horizontalautoplay);
} //上下滾動
if(this.option.direction == 2)
if(this.option.control)
this.cleartimer(this.animateobj, this.verticalautoplay);
} }//水平滾動
this.horizontalautoplay = function()
self.stepleft -= self.animatestep;
$(self.animateobj).animate(, self.option.speed, function());
self.timer = settimeout(self.horizontalautoplay, self.option.delay);
} //手動向左滾動
this.leftscroll = function()).live("click", function(), self.option.speed, function());
return;
}self.stepleft -= self.animatestep;
$(self.animateobj).animate(, self.option.speed, function());
}}).live("mouseout", function()
else
});} //手動向右滾動
this.rightscroll = function()).live("click", function(), self.option.speed, function());
return;
}self.stepleft += self.animatestep;
$(self.animateobj).animate(, self.option.speed, function());
}}).live("mouseout", function()
else
});} //垂直滾動
this.verticalautoplay = function()
self.steptop -= self.animatestep;
$(self.animateobj).animate(, self.option.speed, function());
self.timer = settimeout(self.verticalautoplay, self.option.delay);
} //手動向上滾動
this.upscroll = function()).live("click", function(), self.option.speed, function());
return;
}self.steptop -= self.animatestep;
$(self.animateobj).animate(, self.option.speed, function());
}}).live("mouseout", function()
else
});} //手動向下滾動
this.downscroll = function()).live("click", function(), self.option.speed, function());
return;
}self.steptop += self.animatestep;
$(self.animateobj).animate(, self.option.speed, function());
}}).live("mouseout", function()
else
});} //清除計時器
this.cleartimer = function(obj, func)).live("mouseout", function()
else
});}}
文字列表迴圈無縫滾動
樣式自己設定哦 class notice content id marquee href 第1期成立公告a li href 第2期成立公告a li href 第3期成立公告a li href 第4期成立公告a li href 第5期成立公告a li href 第6期成立公告a li ul div d...
停頓的JS文字滾動,無縫迴圈滾動
間斷滾動 title style marquee marquee div style head body divid marquee divstyle width 260px height 88px font size 3 face 楷體 gb2312 橫向的資料全部顯示的時候就由上往下豎著排列由左...
Js實現內容向上無縫迴圈滾動
當前專案有乙個類似公告向上滾動的需求,在網上搜尋到乙個比較棒的程式,現摘錄如下 document.getelementbyid 的最簡化應用 function element return elements if typeof element string else 類建立函式 var class ...