kswedberg / jquery-expander

Expand and Collapse HTML content
https://kswedberg.github.io/jquery-expander/
Other
459 stars 167 forks source link

An event, like "expander.expanded" or "expander.contracted", after action (& animation) complete #104

Closed adammessinger closed 9 years ago

adammessinger commented 9 years ago

The plugin dispatching an event when expansion or contraction completes would make it easy to take some kind of action only after these things happen.

kswedberg commented 9 years ago

Hi @adammessinger, I'm pretty sure the plugin already has what you're looking for. You can use the afterExpand and afterCollapse callback options. While it's not quite the same thing as dispatching an event, per se, it should get you what you need. Let me know if those two functions don't do it for you.

Here is the list of available callback functions:

onSlice: null, // function() {},
beforeExpand: null, // function() {},
afterExpand: null, // function() {},
onCollapse: null // function(byUser) {},
afterCollapse: null // function() {}