[jQuery] animate suggestion
for the animate function it can only take in numbers which means that
you have to do a parseInt(string) to get out a number. was thinking this
could solve that.
///// snip snip
animate: function(prop,speed,callback) {
return this.queue(function(){
var i = 0;
for ( var p in prop ) {
var e = new jQuery.fx( this,
jQuery.speed(speed,callback,i++), p );
if ( prop[p].constructor == Number ) {
e.custom( e.cur(), prop[p] );
} else if ( prop[p].constructor == String) {
e.custom( e.cur(), parseInt(prop[p]) );
} else {
e[ prop[p] ]();
}
}
},
untested, but should work right?
--
|||||||||||||||||||||||||||||||||||
Will Jessup
c. 760 807 0850
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/