That's right, the current persistence feature is page specific, meaning if you have two collapsing DIVs with the same ID (ie: id="mydiv") on two different pages, the two DIVs will be persisted independently of each other.
If you wish the persistence feature to be site wide, firstly, you need to be aware that the ID you assign to your collapsing DIV now becomes a universal identifier of that exact DIV across all pages on your site. In other words, you cannot have two DIVs on two different pages that are not the same DIV use the same ID.
With that in mind, to make the persistence universal, try the following (untested, but should work):
Code:
animatedcollapse.dotask(window, function(){animatedcollapse.setCookie(uniquepageid+"-"+thisobj.divId, thisobj.isExpanded)}, "unload")
and changing it to:
Code:
animatedcollapse.dotask(window, function(){animatedcollapse.setCookie(thisobj.divId, thisobj.isExpanded)}, "unload")
Then the line:
Code:
document.cookie = name+"="+value
and change that to:
Code:
document.cookie = name+"="+value+"; path=/"
Bookmarks