Wrap text
Report abuse
|
|
var max = 2000;
var Scroller = {
pos: function() {
return parseInt($('scroller').style.left);
},
effect: null,
right: function(x) {
if (max > this.pos()) {
x = x ? x : -400;
if (!this.effect) {
alert('new effect');
this.effect = new Fx.Styles('scroller', { onComplete:function(){ alert('finish') }} );
}
this.effect.start({ 'left': x });
}
}
....
|