Can I stop the page from 'scrolling' back to the top when a user clicks on a tab (with Rails not Jav

Posted by Jake on Stack Overflow See other posts from Stack Overflow or by Jake
Published on 2010-05-26T22:46:06Z Indexed on 2010/05/26 22:51 UTC
Read the original article Hit count: 285

Filed under:
|
|

Ive built a webpage with 'tabs' using rails. When a user clicks a tab, a new page loads. I want to format it so the tabs are always in the same place on the page as a user clicks them. This happens as long as the user has not scrolled down on the page. If a user has scrolled down, clicking on the tab will refresh the page and it is no longer scrolled down - which make clicking the tabs look bad. Is there a way to keep the spot on the page where the user has scrolled down, without using Javascript? If it must be done with Javascript, any suggestions?
T alt text

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about scrolling