Closed PayBas closed 8 years ago
Thanks for pointing that out. This is what's happening:
If the ID of an element is not set it will return an empty string, so as a kind of side effect this will actually work as long as you have only one collapsible component on the entire site. If you instantiate the plugin on several sections, there will be a naming collision and they will overwrite each others state.
So to avoid confusing bugs I'm probably going to throw a warning if someone is trying to use persistent option without specifying id.
It seems to be working fine without an ID nowadays. Did something change? If so, nice work ;). Or is this the difference between HTML5 storage and cookie storage?
But if it's no longer required, perhaps the documentation should probably be updated.