Menu icon Foundation
Using data-reset-on-close makes tabs in Reveal stop working

I have a Reveal modal that I use to show movie information. The modal includes tabs for description and trailer (video embed), among other things.

I use the data-reset-on-close="true" attribute to make the video stop playing when the modal is closed. But this has the weird side effect of making the tabs stop working next time I open the modal.

When I remove data-reset-on-close if works again, but then the video will keep playing on close.

Does anyone have any tips for how to keep the tabs working when data-reset-on-close is used? Is this a bug, or am I just missing something?

revealtabsdata-reset-on-close

I have a Reveal modal that I use to show movie information. The modal includes tabs for description and trailer (video embed), among other things.

I use the data-reset-on-close="true" attribute to make the video stop playing when the modal is closed. But this has the weird side effect of making the tabs stop working next time I open the modal.

When I remove data-reset-on-close if works again, but then the video will keep playing on close.

Does anyone have any tips for how to keep the tabs working when data-reset-on-close is used? Is this a bug, or am I just missing something?

KSP about 2 years ago

I managed to find the solution myself – when the modal gets reset, I had to fire this to re-initialize the tabs plugin. Then it works again!

    $('#film-info-tabs').foundation();