View Full Version : Switch Content: how to bold headers once clicked?

03-29-2008, 03:15 AM
1) Script Title: Switch Content

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

3) Describe problem:

I am wondering if it is possible to bold text once a header item is selected? I am currently using the script with persistence disabled and the contract/expand all feature on.

Thanks for any help!

03-29-2008, 03:19 AM
Find this in the script:

bobexample.setColor('darkred', 'black')

Darkred is the color when the headers are clicked and black when not ;)

03-31-2008, 04:27 PM
Is there a way to modify the script though so that the actual font weight changes to bold? Or maybe a larger font size..

03-31-2008, 08:14 PM
Take a look at this thread (http://www.dynamicdrive.com/forums/showthread.php?t=30101), which contains the modification for adding a "setClass" method to the script. It's based on the .js code before the latest update to Switch Content script for Ajax headers though, but the changes are very simple, so you should be able to just open up both the current and modified .js files, and add the changes in the later to the former. Let us know if you have trouble doing that.

03-31-2008, 08:50 PM
Ah, thank you. I got the script working now to do exactly what I want. :)