Am 08.12.2005 um 08:49 schrieb Nicolas Terray:

If I 'mouseover' the first select box, the second will be highlighted. Great.
If I 'mouseover' and rapidly 'mouseout-mouseover' the first select box
whereas the effect is not finished, the second select box will be
freezed, i.e. the select box remains yellow and will not anymore
return to initial state.

It is a bug ? a feature ?


Feature. The effects let you the choice of exactly when they should be run. If you're calling Effect.Highlight on an element that already has an Effect.Highlight going on, they will clash as they try to manipulate the same CSS styles.

Is there a workaround ?

new Effect.Highlight('right',{queue:'end'});

This will use the effect queuing feature of script.aculo.us to make sure that the Effect.Highlight calls will not clash and will be executed in order.

(btw, you don't need to use the getElementById stuff)

Thomas
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to