tags:

views:

47

answers:

2

Possible Duplicate:
Javascript to make the page jump to a specific location

Is there a way in javascript to make the page jump to a specific location on the page, such as

  <span id='jump_to_this_location'></span>

must be javascript or jquery, I don't want to reload the page.

+1  A: 

You need to create a named anchor (like <a name="jump_here"></a>), and then you can navigate to it using Javascript: window.location.hash = "jump_here";

Daniel Vandersluis
A: 

tell me if this works for you, without re-loading the page.

top!

<script>
window.location.hash = "jump_here";
</script>

<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<a name="jump_here"></a>
bottom!
roger rover