I'm afraid that you're stuck with the jerkiness if you use javascript (rather than something designed for it, like Flash). javascript is single-threaded, so everything (like mouse moves and keypresses) interferes and the interval in setInterval(..., time) is a suggestion to the interpreter rather than anything you can depend on. See http://ejohn.org/blog/how-javascript-timers-work/
That having been said, it looks like you're using setInterval incorrectly, since you clear the interval every time doSomething() is called. If you really want to adjust the timing on each call, use setTimeout. Danny On May 19, 1:27 pm, Ariel Barreiro <[EMAIL PROTECTED]> wrote: > I am new to jquery but an experience developer. > > Here's the code actually running: > > http://guilespi.dyndns.org/jquery/bounceimage/ > > CSS:http://guilespi.dyndns.org/jquery/bounceimage/bounce.css > JS:http://guilespi.dyndns.org/jquery/bounceimage/bounce.js > > The first vector is generally very jerky. Sometimes it stops and then > jumps 40px at once. Is there anything I am missing. HTML, CSS and > javascript is very basic. Javascript has a bunch of math coding to > calculate the time needed for each vector so it appears to be the same > speed along each vector. > > Thank you very much, I am new to jquery and I don't think this is a > problem of jquery, but rather something I am missing. > > Thanks, > a.=