I’m wondering if this method with a little tweak would solve an issue similar to this involving videos and tabs. I have a CMS collection formatted to display in tabs. Tab Link = the video’s name and the tab content = the CMS content (namely the actual video).
I’ve implemented the following so that hovering over tab links automatically opens the tab:
$( this ).click();
This works for the tabs but when you play a video (and leave it playing) and then go to the next tab, the video keeps playing in the background unless it’s manually paused before changing tabs.
I would think I could extend the above code to play or pause videos upon hover by giving the .click more functionality but that’s just my uneducated assumption.
I tried using your solution for the OP but there doesn’t seem to be a way to make BG videos dynamic – hence why I am using the video embed function to connect them to the CMS collection I created for the section.
Any ideas/suggestions? Happy Friday!
Live site with tab collection in question: http://crossfit-elmira.webflow.io/why-join