You can do this by also changing this line within the script with the code in red (leave the previous change above intact):
Originally Posted by stevember
document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()+"; path=/"
The persistence feature will always override any default content open/close setting. However, you can have a specific content be open by default (before any repeat visit to that page causes the persistence to kick in that is) by calling
To then other, default is closed unless specified. But overwritten by persistent. I would like open by default.
defaultExpanded() with the indices of the content that should be expanded by default, for example:
var faq=new switchicon("icongroup1", "div") //Limit scanning of switch contents to just "div" elements
faq.setHeader('<img src="minus.gif" />', '<img src="plus.gif" />') //set icon HTML
faq.collapsePrevious(true) //Allow only 1 content open at any time
faq.setPersist(false) //No persistence enabled
faq.defaultExpanded(0,1) //1st and 2nd content expanded