In the body of the page, where you have something like so after the markup for the switch content:
Code:
<script type="text/javascript">
// MAIN FUNCTION: new switchcontent("class name", "[optional_element_type_to_scan_for]") REQUIRED
// Call Instance.init() at the very end. REQUIRED
var bobexample=new switchcontent("switchgroup1", "div") //Limit scanning of switch contents to just "div" elements
bobexample.setStatus('<img src="http://img242.imageshack.us/img242/5553/opencq8.png" /> ', '<img src="http://img167.imageshack.us/img167/7718/closedy2.png" /> ')
bobexample.setColor('darkred', 'black')
bobexample.setPersist(true)
bobexample.collapsePrevious(true) //Only one content open at any given time
bobexample.init()
</script>
Make that like:
Code:
<script type="text/javascript">
// MAIN FUNCTION: new switchcontent("class name", "[optional_element_type_to_scan_for]") REQUIRED
// Call Instance.init() at the very end. REQUIRED
var bobexample=new switchcontent("switchgroup1", "div") //Limit scanning of switch contents to just "div" elements
bobexample.setStatus('<img src="http://img242.imageshack.us/img242/5553/opencq8.png" /> ', '<img src="http://img167.imageshack.us/img167/7718/closedy2.png" /> ')
bobexample.setColor('darkred', 'black')
bobexample.setPersist(false)
bobexample.collapsePrevious(false)
bobexample.defaultExpanded(0,1,2,3,4)
bobexample.init()
</script>
Note that the setPersist and collapsePrevious are both false. The defaultExpanded is a little tricky. You want them all derfault expanded. 0 is the first, 1 is the second, 2 is the third, and so on. So if you only have three, just put:
Code:
bobexample.defaultExpanded(0,1,2)
If you have 7:
Code:
bobexample.defaultExpanded(0,1,2,3,4,5,6)
I think you see how that goes.
That's it.
The browser cache may need to be cleared and/or the page refreshed to see changes.
If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.
Bookmarks