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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---