well i came across a small snippet online and this particular piece of code is pretty confusing . espically the part after var opts . can somebody please come along and explain to me whats happening ?
[CODE]
function slideTo(imageToGo){
var direction;
var numOfImageToGo = Math.abs(imageToGo – currentImage);
// slide toward left
direction = currentImage > imageToGo ? 1 : -1;
currentPostion = -1 * currentImage * imageWidth;
// from here on its really confusing ……………………..
var opts = {
duration:1000,
delta:function(p){return p;},
step:function(delta){
ul.style.left = parseInt(currentPostion + direction * delta * imageWidth * numOfImageToGo) + ‘px’;
},
callback:function(){currentImage = imageToGo;}
};
animate(opts);
}
i really can point out one part , or atleast whts all tat part like
[CODE]
delta:function(p){return p;},
step:function(delta){
ul.style.left = parseInt(currentPostion + direction * delta * imageWidth * numOfImageToGo) + ‘px’;