I would like to add JQuery events when the CTools modal is launched or closed. It's simple to add an event to the launch or close click
$('.ctools-use-modal').on('click',function () {
$('body').addClass('modal-open');
});
But for closing the modal it becomes cumbersome b/c there are so many ways it can be closed. It seems like there must be a CTools event listener or something? Thanks for your advice...
CTools dispatches the event "CToolsDetachBehaviors" when the modal gets closed. Careful though, the event is fired BEFORE the closing animation has finished.
Here's a sample implementation: