<script type="text/javascript">
/* ==== slider nameSpace ==== */
var slider = function() {
/* ==== private methods ==== */
function getElementsByClass(object, tag, className) {
var o = object.getElementsByTagName(tag);
for ( var i = 0, n = o.length, ret = []; i < n; i++) {
if (o[i].className == className) ret.push(o[i]);
}
if (ret.length == 1) ret = ret[0];
return ret;
}
function setOpacity (obj,o) {
if (obj.filters) obj.filters.alpha.opacity = Math.round(o);
else obj.style.opacity = o / 100;
}
/* ==== Slider Constructor ==== */
function Slider(oCont, speed, iW, iH, oP) {
this.slides = [];
this.over = false;
this.S = this.S0 = speed;
this.iW = iW;
this.iH = iH;
this.oP = oP;
this.oc = document.getElementById(oCont);
this.frm = getElementsByClass(this.oc, 'div', 'slide');
this.NF = this.frm.length;
this.resize();
for (var i = 0; i < this.NF; i++) {
this.slides[i] = new Slide(this, i);
}
this.oc.parent = this;
this.view = this.slides[0];
this.Z = this.mx;
/* ==== on mouse out event ==== */
this.oc.onmouseout = function () {
this.parent.mouseout();
return false;
}
}
Slider.prototype = {
/* ==== animation loop ==== */
run : function () {
this.Z += this.over ? (this.mn - this.Z) * .5 : (this.mx - this.Z) * .5;
this.view.calc();
var i = this.NF;
while (i--) this.slides[i].move();
},
/* ==== resize ==== */
resize : function () {
this.wh = this.oc.clientWidth;//750
this.ht = this.oc.clientHeight;
详细解决方案
帮小弟我看看这段代码什么意思
热度:78 发布时间:2013-09-05 16:02:07.0
相关解决方案
- 在SQL话语里 这个符号“:”什么意思
- javascript中===什么意思?解决方法
- 请教这里的@Override 什么意思 @符号有什么意思
- 请教,java源代码中 @Override、@Nullable 什么意思,小弟我从网下没搜到
- GetCurFocus()什么意思?该怎么解决
- throw new Exception("Message.")什么意思?该如何处理
- Context.Request.ApplicationPath 什么意思?马上结分解决方法
- 请教if (window.ActiveXObject) 什么意思
- Specified file '\Symbian\9.1\S60_3rd_MR\EPOC32\RELEASE\WINSCW\UDEB\.lib' not found 什么意思?解决方案
- matlab 中 ym1(ym1<一) = 1; xm1(xm1<1) = 1;什么意思
- vlan 配备中有一行 standby 101 ip 10.23.101.1 ,什么意思
- "Highest college grade completed"什么意思?解决办法
- "Highest college grade completed"什么意思?解决方案
- 请教这代码里file:///D|/work/vod/Mbar.avi 什么意思
- CSS中的.跟#什么意思
- <div id="container">[color=#aaaaaa]<页面层容器->[/color]什么意思?该如何处理
- if(-f aa.txt) then 什么意思,该怎么解决
- 登陆论坛时的 "浏览器历程" 什么意思
- $(target)什么意思,该怎么解决
- return s && s.getPropertyValue(name) 什么意思?解决方案
- 急求return a.toString().replace(/^(\d)$/, "零$1")什么意思
- <base target="self">什么意思,该如何解决
- $(document).ready(function(){ Alert('" + 什么意思 + "','提醒');})
- jquery 里边end(0) 什么意思
- <A href="javascript:void(0)">什么意思?该怎么解决
- var a=document.getElementsByTagName("input");什么意思?解决方法
- 帮忙解释下 什么意思,该如何解决
- new Integer(1)什么意思?该怎么处理
- js 有关问题,KE.$$ 后面的$$什么意思? 附有完整代码. 求解,
- pagecontext.getRequest()什么意思?该怎么解决