PDA

View Full Version : Switch Content Script access the switch from two places on same page?



gotoplanf
03-31-2012, 05:14 PM
1) Script Title: Dynamic Drive Switch Content Script

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

3) Describe problem:

I have this script up and running without flaw. Great easy script does exactly what it says.

I have a question. On my page i have the switch content open to various services offered by the company. On the click of the service, the switch opens and gives a description. These are set up as anchor elements on the page. I have them referenced as anchor points from a css drop down menu to get the person to the exact service they are looking for. Is there a way to have that service open from the click on the title of the switch content, And by clicking on the anchor reference from the drop down css menu? I seem to be able to only have it work from one or the other.

Essentially. If the click in the css drop down menu i would like it to open the content in the switch at that position.

thanks,

nick

jscheuer1
03-31-2012, 05:55 PM
I think you want:

http://www.dynamicdrive.com/dynamicindex17/ddaccordion.htm

where you can open individual elements via javascript and optionally scroll to them when doing so.

The demo page's first two examples are activated on mouseover but the third is done onclick, so it can do that.

gotoplanf
04-02-2012, 02:14 PM
This was the better choice of script. Worked out for me.