I have a video that appears in a modal. When you close the modal, the audio from the video is still playing. Does anyone know how to stop a video from playing after you close a modal that contains it? I've looked around stack overflow but nothing seems to work so far. Here's the custom webflow js code:
Everything works except the "$('#modal-video').pause();" part.