jquery animate() problem (syntax ?)
- by meo
$('#somediv').stop(false, true).animate({marginLeft: '-=' + e.width() + 'px'}, options.speed, function(){ options.onNewSlide() })
e.with() returns 640
opctions.speed contains 800
options.onNewSlide() contains a a custom callback function
It works fine in firefox. But i debugged it with jquery.lint because it was throwing some random error in IE. lint tells me:
When I called animate(...) with your args, an error was thrown! TypeError: c.speed is not a function { message="c.speed is not a function", more...}
You passed: [Object { marginLeft="-=640px"}, 800, function()]
and it indicates me the line i have posted.
I have checked the jquery doc, but my syntax seams ok.
Do you know what i am doing wrong?
PS: i use jquery 1.4.2 from the google API you can see the error here: http://meodai.ch/slider/ (i know the code is under construction, but still)