You''re looking for Effect.Morph
http://wiki.script.aculo.us/scriptaculous/show/Effect.Morph
Best,
-Nicolas
On Dec 13, 2007 4:53 PM, NiK
<nicola.albertini-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> Is there a way to make a transition (i.e. modify the margin as in my
> example) happen gradually?
>
> <div id="navigation">
> <p>List 1</p>
> <p>List 2</p>
> <p>List 3</p>
> </div>
>
> <script type="text/javascript">
> var menuItems = $$(''#navigation p'');
>
> menuItems.each(function (p) {
> p.observe(''mouseover'', function
MouseOver(event) {
> var element = Event.element(event);
> element.setStyle(''margin-left: 10px; color:
#fff;'');
> });
>
> p.observe(''mouseout'', function
MouseOut(event) {
> var element = Event.element(event);
> element.setStyle(''margin-left: 0px; color:
#300;'');
> });
> });
> </script>
>
> Thanks in advance
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---