View Full Version : Switch Content Demo2 - Dynamic Content ?

11-27-2007, 07:55 PM
1) Script Title: switch content script

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

3) Describe problem:

im using demo 2 with "content is hidden" as default
i did it by removing this line


my problem when i use this code..

<p id="joecontent1" class="switchgroup2">
<{foreach item=item from=$mydata}>
<{include file="section.html" item=$item}>


- the content is open when loading..i need it to be hidden
- when i clicked open/closed/title nothing happen..it kept displaying

how do i make this work ?
what should i replace p with in the code below ?
i tried <table> and <td> it does not work

var joeexample=new switchcontent("switchgroup2", "p")

11-28-2007, 01:24 AM
What tag are you using to wrap each Switch Content? "DIV" works most reliably across browsers fyi.

I think a link to the problem page may be helpful here.

11-28-2007, 04:07 AM
I changed it to "div" and it works thank you :)