Trigger a "pause video" function on Tabs-Content tab switch

I am trying to figure out the way to tap into the a tab switching event, so I can pause a youtube video playing in a different tab. I couldn’t find any info. Thanks.

There’s a change event for when tabs change, you should be able to hook into that to stop the youtube video. E.g.

$(selector).on(‘change.zf.tabs’, function() {
//do something

Thanks! Have it working now :slight_smile:

1 Like