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.