First, this group doesn't know much about Rails, so you won't get any advice on
how to move some code to application.js
But, I believe your issue can be easily solve with a little help from the queue
mechanism.
Check Effect Queues - scriptaculous - GitHub
So you might end up with a slightly modified
:onmouseout=>"new Effect.Move(this, {x: 10, y: 0, duration: 0.2, queue: 'end' }
); return false;"
Hope this helps,
Christophe
Le 7 avr. 2010 à 06:16, emachnic a écrit :
> I'm new to Prototype and script.aculo.us and I have this code in my
> view that makes a link move left onmouseover and back right
> onmouseout. I have had the same problem as others where it executes
> the onmouseout event even if onmouseover hasn't finished so I wanted
> to put this in my application.js file and I needed to know how to
> write it there and call it in the view. This is written in HAML for a
> Rails2.3.5 app.
>
> = link_to "BLOG", {:action => "index"}, :id => "sideLink1", :class =>
> "sideLink", :onmouseover => "new Effect.Move(this, {x: -10, y: 0,
> duration: 0.2}); return false;", :onmouseout => "new Effect.Move(this,
> {x: 10, y: 0, duration: 0.2}); return false;"
>
> Any help/suggestions would be much appreciated. Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prototype & script.aculo.us" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.