Jump to content

Scroll back up to the start of the page

Recommended Posts

Why don't you just use HTML and anchors?

<a href="#top"><img ... /></a>

Link to post
Share on other sites

Using HTML anchors is the best way as it doesn't rely on JS being enabled but if you want or need to use JS only here is how you do it.

<img src="..." alt="" onclick="window.scrollBy(0,0)"/>

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...