Make sure you're using queues. http://wiki.script.aculo.us/scriptaculous/show/EffectQueues
http://wiki.script.aculo.us/scriptaculous/show/Effect.toggle TAG On Jun 7, 2007, at 6:14 AM, detlevv wrote: > > Hi, > I' tried to realize a switch between two images on mouse-over/mouse- > out (grey/colored one), but w/o success. We are using prototype/ > scriptaculous. > > With the following code the front image (colored) should appear on > mouse-over and hidden on mouse-out, but nothing happens. I tried some > other more complicated variations (using Fade/Appear directly), but > only producing strange flickering effects. > > <div id="mfBannerDiv"> > <div id="mfBannerGrey"><img src="grey.jpg"></div> > <div id="mfBannerColr"><img src="color.jpg" ></div> > </div> > > > in external script-file: > Event.observe(window, 'load', function() { > Event.observe('mfBannerDiv', 'mouseover', function() { > new Effect.toggle('mfBannerColr'); }); > Event.observe('mfBannerDiv', 'mouseout', function() { > new Effect.toggle('mfBannerColr'); }); */ > }); > > Any help will be welcome. Thanks in advance. > > detlevv > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
