Hi, I just want help to debug this script : http://www.norprotex.com/script.aculo.us/ I just want to replace image when the mouse is over the element with a nice effect powered by script.aculo.us and I want this image to return to its initial statements on mouseout. My script is ok for this but images disappear in few seconds !! WHY ? Thanks for your help. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Christophe Porteneuve aka TDD
2006-Oct-05 14:59 UTC
Re: using script.aculo.us to do a nice menu
Hey Arnault, arnault a écrit :> My script is ok for this but images disappear in few seconds !! > WHY ?The immediate reason is: you use effects as if they were synchronous, which they aren''t: your "new Effect" calls return immediately, so you try to execute a Fade/change/Appear *in immediate sequence*. This won''t work. What you need is Event queues. It''s also the only way to make your over/out ergonomy work. Also, your JS code breaks a couple rules. For instance, your ajouter_Stay function use *global* variables (you didn''t declare them with "var", so they''re global by default), which means you might run into issues if you hover over multiple items too rapidly. Anyway, this code is better written using a RegExp. Give me a couple minutes to fix your example and I''ll post the resulting code here. -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Christophe Porteneuve aka TDD
2006-Oct-05 15:38 UTC
Re: using script.aculo.us to do a nice menu
Hey Arnault, arnault a écrit :> Thanks for your help.Sure thing. There you go: http://tddsworld.com/extrahost/rails-spinoffs/hoverfades.html You should use UJS and avoid all those onmouseover/out in your HTML, you know... This would be cleaner, and avoid issues when hovering before s.a.us is loaded. I also took the liberty to rewrite the URL-changing code in order to use RegExp''s, which makes the code way more concise. However, please double-check the $-based replacement syntax (which IS JS 1.5 standard) does work on all your target browsers. Best regards, -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---