danielstocks / jQuery-Collapse

A lightweight (~1kb) jQuery plugin that enables expanding and collapsing content
http://webcloud.se/jQuery-Collapse/
MIT License
679 stars 153 forks source link

Persistence and User Defined Open / Close Functions #80

Closed gdehmlow closed 4 years ago

gdehmlow commented 9 years ago

I noticed that when I define my own open and close functions for the Collapse objects, when the state of the sections is loaded from local storage via setting persist = true, the functions that I defined do not get called when restoring state (i.e. the Section's close and open methods are called instead of the Collapse's). I would have expected my functions to get called. I ended up writing a quick workaround because I rely on these functions getting called in order to style things appropriately... what do you think about making this the default behavior?