Ticket #7747 (closed feature: plugin)
Animation Groups
| Reported by: | matthewmatician@… | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | |
| Component: | effects | Version: | 1.4.4 |
| Keywords: | needsreview | Cc: | |
| Blocking: | Blocked by: |
Description (last modified by jitter) (diff)
A best-practice in using javascript to animate transitions is to remember to "Stop" other animations in progress that would cause undesirable outcomes (e.g., if a user hovers their mouse quickly over many buttons, back & forth, we sometimes see these buttons flash on & off repeatedly). One way to automate this is to categorize elements into groups, and define characteristics to the group. For example, we could define a group as "onlyOneActive", meaning that all other animations in progress must stop and go back to their inactive state. Another example would be to define a group as "skipToState", meaning that all other animations must skip ahead to the state to wich they are currently transitioning.
Change History
comment:4 Changed 2 years ago by dmethvin
- Keywords needsreview added
- Component changed from unfiled to effects
comment:5 Changed 2 years ago by muley
I made an animation groups plugin some time ago as a proof of concept... it's a rough draft, but may be of use: http://adam.cirkuit.net/animationGroups
comment:6 follow-up: ↓ 7 Changed 2 years ago by lrbabe
Can't you just use jQuery.fn.stop to that purpose? http://api.jquery.com/stop
I think this tutorial will help you to achieve what you are describing. http://www.learningjquery.com/2009/01/quick-tip-prevent-animation-queue-buildup
comment:7 in reply to: ↑ 6 Changed 2 years ago by matthewmatician@…
Replying to lrbabe:
Can't you just use jQuery.fn.stop to that purpose? http://api.jquery.com/stop
I think this tutorial will help you to achieve what you are describing. http://www.learningjquery.com/2009/01/quick-tip-prevent-animation-queue-buildup
I'm actually suggesting a more streamlined approach than the "stop" function. Often in an interface you need to call several "stops" to different elements before proceeding. It's often not a big deal to manage 5 or 6 cooperative elements, but if you need to manage any more than this, your code becomes lengthy and repetitive.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Updated description and removed superseded comments