The first scenario should work too.Make sure the configuration code:
Code:
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');
is called at the end, following all the HTML for the switch contents themselves. If you still need help, please post a link to the page on your site that contains the problematic script so we can check it out.
p.s: Please try and format any code in your post using the CODE tags. It just makes it easier to read.
Bookmarks