There are custom events for the collapsible
blocks. You can bind to the expand
and collapse
events:
$('#my-collapsible').bind('expand', function () {
alert('Expanded');
}).bind('collapse', function () {
alert('Collapsed');
});
Here is a jsfiddle: http://jsfiddle.net/6txWy/