jquery animate() problem (syntax ?)
Posted
by meo
on Stack Overflow
See other posts from Stack Overflow
or by meo
Published on 2010-04-26T12:54:59Z
Indexed on
2010/04/26
13:13 UTC
Read the original article
Hit count: 204
jQuery
$('#somediv').stop(false, true).animate({marginLeft: '-=' + e.width() + 'px'}, options.speed, function(){ options.onNewSlide() })
e.with()
returns 640opctions.speed
contains 800options.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)
© Stack Overflow or respective owner