There are different events during the opening and closing of modals on which you can attach javascript actions.
So if you need to trigger some custom javascript function or something in a 3rd party plugin, you can do that.
The available events are:
on-openEvent that fires right before the modal begins to open.on-loadEvent that fires right before attempting to load the target content.on-loadedEvent that fires right after the content has finished loading.on-openedEvent that fires right after the modal is opened.on-closeEvent that fires at the start of the close process.on-closedEvent that fires once the modal is closed.
{modal article="My Article" on-open="alert('The modal is opening!');"}Alert when opening{/modal}
{modal article="My Article" on-closed="alert('The modal just closed!');"}Alert when closed{/modal}
{modal article="My Article" on-open="console.log('on-open');" on-load="console.log('on-load');" on-loaded="console.log('on-loaded');" on-opened="console.log('on-opened');" on-close="console.log('on-close');" on-closed="console.log('on-closed');"}See the browsers console{/modal}