Good idea Stefan, this would help alot in further effects development. Maybe we can add a global object or method called something like $.queue, which does something like this:

$.queue('click') = {0: {fx: animate params, state: '50%'}, 1: {animate params, state: '0%'}, 2: {animate params. state: '0%'} }

methods could be:

$.queue('click', 'next')
$.queue('click', 'stop')
...

2006/10/9, Stefan Petre <[EMAIL PROTECTED] >:
Paul Bakaus wrote:
Hi there,

I'm currently searching for a good solution to stop jQuery's interal function animate() when a new event occurs. A very basic example:

1. You have a moving div container which has a duration of 10 seconds, it moves from left: 0px; to left: 500px.
2. Somewhere in your page there's a "stop" button, if you press it, the animation will end before duration has ended.

I need it for a special case where I start a animation using a click, and if I click again, the new animation should begin right away and the old one cleared.

Any ideas?

--
Paul Bakaus
Web Developer
------------------------
Hildastr. 35
79102 Freiburg

_______________________________________________
jQuery mailing list
discuss@jquery.com http://jquery.com/discuss/
Yeah, I faced a lot of situations where I needed some control over events. I even open a ticket on this issue. I would like something like end current queued effect, pause effect, dequeue the rest of events. Maybe ending  effect with some option, go to last step, go to first step etc. I faced the problem on fisheye menu and tooltips.




_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





--
Paul Bakaus
Web Developer
------------------------
Hildastr. 35
79102 Freiburg
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to