I''m trying to use Scriptaculous'' (1.8 preview) Effect.ScrollTo feature. No matter what ID I provide as an argument it scrolls so the top of the document. Has anyone else had this problem? James H. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Just to continue some findings... 1. It works in Safari 3 (beta) 2. The problem is in Firefox 2 3. Here''s the gist of what I want to do: http://pastie.caboo.se/110262 I''ve tried picking apart the function, and the problem appears to be in the highlighted part of this pastie: http://pastie.caboo.se/110263 the ''max'' variable comes out negative. Any ideas? James On Oct 23, 8:53 pm, James Herdman <james.herd...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m trying to use Scriptaculous'' (1.8 preview) Effect.ScrollTo > feature. No matter what ID I provide as an argument it scrolls so the > top of the document. Has anyone else had this problem? > > James H.--~--~---------~--~----~------------~-------~--~----~ 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 wonder if there was a reason to write elementOffsets[1] > max ? max : elementOffsets[1] instead of Math.max(elementOffsets[1], max) --~--~---------~--~----~------------~-------~--~----~ 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 tried this but it failed. I also tried it''s opposite: Math.min. James On Oct 23, 11:59 pm, kangax <kan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I wonder if there was a reason to write > > elementOffsets[1] > max ? max : elementOffsets[1] > > instead of > > Math.max(elementOffsets[1], max)--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---