Pure-Essence.Net

return to top link without bookmark

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>

to link it.

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.

Advertisement

4 Responses to "return to top link without bookmark"

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.

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)”"

:smile: thanks :smile:

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

My most adorable Pomeranians

Categories

Archives

SocialVibe


Follow

Get every new post delivered to your Inbox.