Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URGENTLY || SMOOTH SCROLL

Status
Not open for further replies.

ferikeko

Technical User
Dec 4, 2009
2
GB
Hi there.
My problem is that I’m trying to use a smooth scroll script for a webpage and the problem is that it have to scroll from one div to another not from anchor tag to a div. I thought of making a simple script which allow me to hyperlink the div
The script is simply

Top Script
Code:
<script type="text/javascript" language="javascript">
function go(url)
 {
  window.location=url;
 }
</script>

Script attached to Div Tag
Code:
<div onmouseup="window.location='#scroll_up'">Scroll up</div>

It works fine. It scrolls up to the top div that gave id scroll_up.
Is there is any way to make this scroll smooth?
Eg:
Thanks
Taha
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top