Firstly, per our usage terms, please note that the credit notice for this script should be in your actual page source. In other words, the notice:
Code:
/***********************************************
* Tab Content script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
should be in between the <script> tags for this script and not inside the .js file itself.
To answer your question, one way is to do the following:
First, identify the tab that you want to jump to from within the same page, and give it an ID attribute:
Code:
<li><a href="new.htm" onClick="return expandcontent('sc2', this)" theme="#EAEAFF" id="whatsnew" >What's New</a></li>
Here I'm saying the 2nd tab in the demo is the one I want to jump to.
Then, for the jump to link, do something like this:
Code:
<a href="new.htm" onClick="return expandcontent('sc2', document.getElementById('whatsnew'))" theme="#EAEAFF">What's New</a>
Clicking on the above link should now jump to the 2nd tab while highlighting it as well.
Bookmarks