jquery animate() problem

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:03 UTC
Read the original article Hit count: 123

Filed under:
$('#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?

© Stack Overflow or respective owner

Related posts about jQuery