I'm using this script to pause a video when clicking on the close button:
var vid = document.getElementById("video19");
$('#md-close').click(function(){
vid.pause();
});
but if I have more than one video, I can't use id for that. I tried to use getElementByClassName but it didn't work even in the last version of chrome.
so I want one script that pauses the current video when I click on close button. how can I do that?