Reputation:
Is there a way to trigger two morph or tween effects for two different dom elements at the exact same time?
I created this demo. http://jsfiddle.net/jLmAS/ Click the green block to test.
It seems to work alright although it doesn't seem technically correct. I can imagine if there were 1000 blocks you would see a lag with the bottom blocks.
Any thoughts or ideas?
Upvotes: 1
Views: 430
Reputation: 3502
If what the animation does is the same on both elements, there's no reason for using morph
and tween
. Otherwise, what you're looking for is Fx.Elements
(http://mootools.net/docs/more/Fx/Fx.Elements), it takes an Element Collection and applies different animations to them. Fx.Elements
is there for the sole reason of animating multiple elements at the same time.
Upvotes: 2