Hi all, I'm using Scriptaculous version 1.5.0 to make div's that are hidden at first (display: none position : absolute) visible using the cool effects of Scriptaculous. However when I use the effects (Appear, BlindDown, BlindUp) on div's that are positioned low in a long page IE and Firefox always scroll back to the top of the page, sometimes even scrolling away from the effected div's. What's causing this? Can I stop it? Thanks for all the good work and regards, Jeroen _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
My guess is that you''re using: <a href="#" onclick="Effect.Appear(''some_element'');">blah</a> style links. You must add "return false" to the onclick event, like this: <a href="#" onclick="Effect.Appear(''some_element'');return false">blah</a> So the "#" href isn''t executed by the browser (which scrolls the page to the top). -Thomas Am 30.12.2005 um 15:57 schrieb Jeroen Verhagen:> Hi all, > > I''m using Scriptaculous version 1.5.0 to make div''s that are hidden at > first (display: none position : absolute) visible using the cool > effects of Scriptaculous. However when I use the effects (Appear, > BlindDown, BlindUp) on div''s that are positioned low in a long page IE > and Firefox always scroll back to the top of the page, sometimes even > scrolling away from the effected div''s. > > What''s causing this? Can I stop it? > > Thanks for all the good work and regards, > > Jeroen > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Hi Thomas, On 12/30/05, Thomas Fuchs <t.fuchs@wollzelle.com> wrote:> My guess is that you're using: > > <a href="#" onclick="Effect.Appear('some_element');">blah</a> > > style links. You must add "return false" to the onclick event, like > this: > > <a href="#" onclick="Effect.Appear('some_element');return > false">blah</a>That was it! Many, many thanks... Jeroen _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs