View Full Version : Switch Content - Bookmarks Help

03-17-2010, 06:11 PM
1) Script Title: Switch Content

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm

3) Describe problem: I'm using this script on a page of presenter bios and the divs are separated alphabetically. The bios contain links to other bios on the page and when I click on them, they do not work. I added this script below to detect the # in incoming urls. The divs expand and the bookmarks work with incoming urls, but I can't figure out how to make it work on the page. I looked at the script for Switch Content II and didn't see a solution. Any ideas? :confused:

if(window.location.hash ) {
} else {

03-19-2010, 05:46 PM
I figured it out. Although I prefer an dynamic solution for team members that are not familiar with HTML.

I created the function :

function expand() {

And inserted onClick in each <a> with a bookmark on the page:

<a href="#bookmark" onclick="expand()">