Yeah, i know, i ended up using html,body ;)
On May 30, 10:18 pm, Ariel Flesler <afles...@gmail.com> wrote: > It won't work on all major browsers. Not all of them support scrolling > when applied to 'html', some require 'body'. This varies depending on > whether you're on quirks mode or not. It's even more problematic when > animating iframes. > > -- > Ariel Flesler > > On May 30, 1:52 pm, GaVrA <ga...@crtaci.info> wrote: > > > Everything is fine. It turns out i have putted this script on wrong > > place so it was imported and runned 20 times... Dont ask why... lol > > > Like i said - now it works like a charm... :) > > > On May 30, 5:17 pm, GaVrA <ga...@crtaci.info> wrote: > > > > I said $('html') is working... Please read more carefully... > > > > What i need is a fix for this function becouse it is still being > > > animated for a small period of time, after it reach top. It seems that > > > if you have that anchor relativly close to the top, this bug have more > > > chance to show, and for instance if anchor is way down then it works > > > like it should... <_< > > > > On May 30, 5:06 pm, waseem sabjee <waseemsab...@gmail.com> wrote: > > > > > $('a.goToTop').click(function() { > > > > $(this).animate({scrollTop : 0},'slow'); > > > > }); > > > > > OR > > > > > $('a.goToTop').click( function() { > > > > $().animate({scrollTop : 0},'slow'); > > > > }); > > > > > On Sat, May 30, 2009 at 4:55 PM, GaVrA <ga...@crtaci.info> wrote: > > > > > > If you mean just to remove html with body - that wont work... Already > > > > > tried it. > > > > > > On May 30, 4:50 pm, waseem sabjee <waseemsab...@gmail.com> wrote: > > > > > > $('a.goToTop').click(function( > > > > > > > > ) { > > > > > > > $('body').animate({scrollTop : 0},'slow'); > > > > > > > }); > > > > > > On Sat, May 30, 2009 at 4:29 PM, GaVrA <ga...@crtaci.info> wrote: > > > > > > > > Hi! > > > > > > > > I am using this code: > > > > > > > > $('a.goToTop').click(function() { > > > > > > > $('html').animate({scrollTop : 0},'slow'); > > > > > > > }); > > > > > > > > And it works like it should. Problem is that sometimes it just > > > > > > > bugs > > > > > > > out for short period of time, like when you click anchor and it > > > > > > > scroll's to top, if you then try to use scroll on mouse to scroll > > > > > > > down > > > > > > > it just keep returning you to top... :( > > > > > > > > And after that short period of time it stop's doing that. > > > > > > > > Any idea how to fix this? Something like when it reach top to stop > > > > > > > working or something like that.