SwitchContent - Strange Timing(?) Bug
Switch Content Script II (icon based)
http://www.dynamicdrive.com/dynamici...chcontent2.htm
I just installed the above script and got it working - sort of. But here's the strange part... I have to insert an "alert" to get it to work. I'm relatively sure I have all my HTML stuff set up right, coz I CAN get it to work in one situation.
=== This does NOT work...
var details = new switchicon("detailgroup", "div");
details.setHeader('<img src="<?php echo $sRelPath ?>css/basic/minus.gif" />', '<img src="<?php echo $sRelPath ?>css/basic/plus.gif" />');
details.collapsePrevious(false);
details.setPersist(false);
details.init();
details.sweepToggle('expand');
=== This DOES work...
var details = new switchicon("detailgroup", "div");
alert('got here');
details.setHeader('<img src="<?php echo $sRelPath ?>css/basic/minus.gif" />', '<img src="<?php echo $sRelPath ?>css/basic/plus.gif" />');
details.collapsePrevious(false);
details.setPersist(false);
details.init();
details.sweepToggle('expand');
I'm stumped. Any help would be greatly appreciated.