[jQuery] Re: .animate() queue without pause between animations

2009-01-14 Thread Miloš Rašić
I don't think so. The number of pixels is not a fixed number between the positions in the menu. There are 5 icons and 5 positions, so I use an array of 5 objects that contain css properties(left, top, zIndex, width, height and opacity) of each position. The problem with calling .animate() once is t

[jQuery] Re: .animate() queue without pause between animations

2009-01-14 Thread Miloš Rašić
Thanks a lot to you and Karl for help. The animation works smoothly now. I had to switch to animating without queue and using setTimeout for the second rotation. It would be nice if jQuery would provide some functionality to the queues where we could choose if we want a pause between animations and

[jQuery] Re: .animate() queue without pause between animations

2009-01-13 Thread Nikola
Ahh, sorry about that UI always comes to mind when I think of visual presentation, ie. fading, exploding, animating etc..

[jQuery] Re: .animate() queue without pause between animations

2009-01-13 Thread Karl Swedberg
Is it possible to have a variable for the number of pixels by which the menu animates (and doubling it when necessary), rather than calling animate twice? Also, .animate() is part of jQuery core, so you've posted to the correct group. ;-) --Karl Karl Swedberg www.englishrule

[jQuery] Re: .animate() queue without pause between animations

2009-01-13 Thread Nikola
What about doing something similar to what Karl Swedberg did in his animated scrolling example? http://www.learningjquery.com/2007/09/animated-scrolling-with-jquery-12

[jQuery] Re: .animate() queue without pause between animations

2009-01-13 Thread Miloš Rašić
Here's the function I use to rotate the menu: http://paste.pocoo.org/show/99509/ The icons are located inside divs with ids 'pos_1' through 'pos_5', 'pos_1' being the leftmost icon, and 'pos_5' being the rightmost icon. The all have class 'pos'. The problematic case occurs when the user clicks on

[jQuery] Re: .animate() queue without pause between animations

2009-01-13 Thread Nikola
Also, you might want to try posting questions like this one in the jQuery UI group as .animate is part of jQuery UI. http://groups.google.com/group/jquery-ui?hl=en&pli=1

[jQuery] Re: .animate() queue without pause between animations

2009-01-13 Thread Nikola
It's hard to tell without having a look at the code. You may want to try http://paste.pocoo.org to post code like this. Are you chaining the animations? ie. $(this).animate({},speed).animate ({},speed).animate({},speed); You could always try setting a delay on your second animation with setTime