Stop video when modal is closed
问题 I'm trying to stop videos in modals from playing when they have been closed. The problem is that my modal script moves the modal from its original place to just before the closing </body> tag. So with stop video script technically above the modal window the video never stop playing after modal is closed. Here's the modal script i use https://github.com/VodkaBears/Remodal JQUERY TO STOP VIDEO var stopVideo = function ( element ) { var video = element.querySelector( 'video' ); // script stops