Jump to content

Link to a tab from anther page / window at 0,0


mykul

Recommended Posts

Hey!!

 

Got an issue:

 

I need to link from one page to a tab on another page. No prob, I can do that (the tabs have a #) but my problem is I need the whole page to stay scrolled to the top.

Currently when I link to a tab, the page will start at the top of that tabs content.

 

I've used this:

 

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>

<script type="text/javascript">

$(document).ready(function(){

window.scrollTo(0,0);

});

</script>

 

It works great in Firefox but in nothing else.

 

 

An example of a link from the original page:

 

<div class="shorty_purchase"><a href="products.html#tab-4-div " class="button small green"> <span>Continued...</span></a></div>

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

Guest
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.

Loading...
×
×
  • Create New...