Open yorismith opened 10 years ago
I have the same problem, except I realized that if you use cookies the defaultOpen option is overridden ( please include that in the readme =) ). I can't' figure out how to get them all to default to open with cookies enabled..so that it's pretty much backwards, I want it to save the id's that are supposed to be closed instead of open.
aahh..no wonder why I can't get it to work...well, if using cookie can't use all "opened" then what the point to use cookie, right? that means cookie is useless on what I am trying to do because it will never worked...I wish we have a ways...
Thank you cskunk
It seems the problem is that the cookie is being created when the page first loads.
If you place the following line right below the declaration of the opts variable in the createCollapsible function, it always returns true, even before the cookie is set later in that same function.
alert(issetCookie(opts));
I'm assuming that something in the issetCookie function is actually creating the cookie as well...?
Ok, easy solution everyone. Change the following line in the issetCookie function:
if ($.cookie(opts.cookieName) === null)
...change it to this:
if ($.cookie(opts.cookieName) == null)
shortguy04, that didn't work for me =( it still doesn't read the defaultOpen sections when I have the cookies.js loaded
I found this is the best collapsible plugin on the Internet which works perfectly with cookie...I have simple question here...I want to use this plugin with all defaultOpen because I don't seem to get it to work even I tried to specify all section from http://www.snyderplace.com/demos/collapsible.html but they all still not "open" by default...
Thank you for your great work! Yori