Hi,

i need some help with Effect.Appear/Effect.Fade

i would like fade in and out an element on hovering an element(-> tooltip behavior), but when i'm using Effect.Appear/Effect.Fade both effects will continue to play and overlap each other, resulting in unpredictable behavior.

<code>
<button onmouseover="Effect.Appear('test_div2')" onmouseout="Effect.Fade('test_div')">TRIGGER</button> <div id="test_div" style="width: 100px; height: 100px; background-color: #FF33CC;">TEST</div>
</code>


So i need some advice how to stop a running effect for an element, so i can start the opposite effect.

I also tried to work with Effect.toggle, but this will just add all new effects to the end of the queue, instead of stopping the running effect and start the intended one immediately. (in my opinion Effect.toggle is doing this wrong - if a user clicks a toggle button very often, or is hovering a trigger very fast and often the animation will go on, and on, and on...)

thanks for your help
matthias


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

Reply via email to