scottlangendyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Nov-11 01:31 UTC
Script.aculo.us SlideDown Problems
I am working on a project which incorporates the script.aculo.us SlideDown effect. The HTML is as follows: <li class="picture" onmouseover="Effect.toggle(''picture1'', ''slide'');" onmouseout="Effect.toggle(''picture1'', ''slide'');"> <div id="picture1" style="display: none;"><div></div></div> <div id="picture1-bottom" class="picture-bottom"></div> </li> You can see the use here http://www.lineone.ca Now it seems to do as its supposed to, however a logic error soon arrives. If the user mousesout before the slidedown is finished, it will not automatically slide back up as it should. Its not a huge issue at the moment but I would like to find a fix to it. It also seems relatively buggy and not very user friendly at the moment. I would really like to get this issue fixed as soon as possible, so any help would be greatly appreciated. How should I go about fixing this issue? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
scottlangendyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Nov-11 13:25 UTC
Re: Script.aculo.us SlideDown Problems
Anyone? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I believe there is way to assign a function to the event on complete. Maybe just add a function to check if the mouse is in the coords of the picture or something :) On Nov 11, 2007 1:25 PM, scottlangendyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <scottlangendyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Anyone? > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
The way I would tackle this issue is write your own "check" function, one that looks at all the picture divs, determine if they''re shown or hidden, sets them as appropriate, prior to sliding the new content in. a href=# onmouseover="checkDivs(id of div to show);" function checkDivs(sId){ var oTarget = document.getElementsByid(''pictures''); var oDivs = oTarget.getElementsByTagName(''div''); for (i = 0; i < oDivs.length) { check div display looks like you don''t want to affect the "bottom" divs, so be sure to not affect those if its ID matches the one to show and it''s currently shown, do nothing else if its ID doesn''t match and it''s currently shown, hide it } } Also, you may want to use scriptaculous'' queue functionality to this, otherwise too many thing will try to happen at once, causing issues with crappy computers, IE 6 Hope that helps Joe On Nov 10, 8:31 pm, "scottlangen...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <scottlangen...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am working on a project which incorporates the script.aculo.us > SlideDown effect. > > The HTML is as follows: > > <li class="picture" onmouseover="Effect.toggle(''picture1'', ''slide'');" > onmouseout="Effect.toggle(''picture1'', ''slide'');"> > <div id="picture1" style="display: none;"><div></div></div> > <div id="picture1-bottom" class="picture-bottom"></div> > </li> > > You can see the use herehttp://www.lineone.ca > > Now it seems to do as its supposed to, however a logic error soon > arrives. If the user mousesout before the slidedown is finished, it > will not automatically slide back up as it should. Its not a huge > issue at the moment but I would like to find a fix to it. It also > seems relatively buggy and not very user friendly at the moment. I > would really like to get this issue fixed as soon as possible, so any > help would be greatly appreciated. > > How should I go about fixing this issue?--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---