Posted by: pureessence on: February 25, 2005
i saw this on leslie’s site. i never thought of it before. the conventional way to do a “return to top” link is create a bookmark with:
<a name="top"></a>
at the top of the page and then use:
<a href="#top">Return to Top</a>
well there’s an easier way. this only works if you want to return to the very top of the page. it obviously does not replace the functionality of bookmarks.
<a href="#" onclick="window.scrollTo(0,0);return false;">Return to Top</a>
Since the latter one uses javascript therefore it will not work on browsers with javascript disabled.
wow, that can come in handy, i regret adding 1000′s of back to top’s the old way now. haha. I’ve been a fan of your page forever, i love it
Hey, thanks for that.. it works realy well.. I’m using it on my site now.. hehe… thank god I only have to edit only one file to change that.. or I will be (O.o)”"
thanks
February 25, 2005 at 4:08 pm
look what i found: http://bluesplash.blogspot.com someone has your name!
btw: thats a really cool tip. i think i’ll use it on my blog.
thnx.