I think I got this worked out pretty well. I added a public function:
Code:
instance.keepOneOpen(Boolean)
Specifies whether one content should always be expanded no matter what.
Parameter:
Boolean: true or false
It works well with the other options as far as I can tell. Except not with the expand all or contract all functions. For example, it works with the demo's joeexample, but not with the bobexample.
For this to work out, numerous additions to the script were required. So, I will attach the updated switchcontent.js script below. One other item of interest - the content that will always be open defaults to the first content. But, if:
Code:
instance.defaultExpanded(indices)
is specified, it will use the first index. Indices may be specified in any order.
Here's the updated script (unzip the below and replace your switchcontent.js with it):
Attachment 999
Bookmarks