It really depends on the details as far as which contents you wish to exclude from contracting/ expanding within the group when calling sweepToggle(). The pertaining function inside switchcontent.js FYI is:
Code:
switchcontent.prototype.sweepToggle=function(setting){ //PUBLIC: Expand/ contract all contents method. (Values: "contract"|"expand")
if (typeof this.headers!="undefined" && this.headers.length>0){ //if there are switch contents defined on the page
for (var i=0; i<this.headers.length; i++){
if (setting=="expand")
this.expandcontent(this.headers[i]) //expand each content
else if (setting=="contract")
this.contractcontent(this.headers[i]) //contract each content
}
}
}
Lets say you're able to label the target icons manually using a "title" attribute like so:
Code:
What is JavaScript? <span id="faq1-title" class="iconspan"><img src="minus.gif" /></span>
<div id="faq1" class="icongroup1" title="exclude">
JavaScript is a scripting language originally developed by Netscape to add interactivity and power to web documents.
</div>
What is DHTML? <span id="faq2-title" class="iconspan" title="exclude"><img src="minus.gif" /></span>
<div id="faq2" class="icongroup1">
DHTML is the embodiment of a combination of technologies
</div>
Then you can modify the pertaining function above to ignore those icons' contents by doing:
Code:
switchcontent.prototype.sweepToggle=function(setting){ //PUBLIC: Expand/ contract all contents method. (Values: "contract"|"expand")
if (typeof this.headers!="undefined" && this.headers.length>0){ //if there are switch contents defined on the page
for (var i=0; i<this.headers.length; i++){
if (setting=="expand" && this.headers[i].title!="exclude")
this.expandcontent(this.headers[i]) //expand each content
else if (setting=="contract" && this.headers[i].title!="exclude")
this.contractcontent(this.headers[i]) //contract each content
}
}
}
Bookmarks