
Originally Posted by
stevember
Thats perfect for session but what need change for if number days are defined?
You can do this by also changing this line within the script with the code in red (leave the previous change above intact):
Code:
document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()+"; path=/"
To then other, default is closed unless specified. But overwritten by persistent. I would like open by default.
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 defaultExpanded() with the indices of the content that should be expanded by default, for example:
Code:
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
faq.init()
Bookmarks