When am clicking the X it closes but when am missing the X the video runs in background. Here is what am using: https://jsfiddle.net/ectanq7z/6/ When the X is clicked the video stops but when I click outside the popup the video continues to run in background and this should be paused when the modal is hiden. Thank yo very much!
If you need a click outside modal popup to behave the same then try to extend an example from this link: https://getbootstrap.com/docs/3.3/javascript/#modals-events And so I guess the additional code may look like the following: ... $('#videoModal').on('hidden.bs.modal', function (e) { // do something... $(this).find('iframe').attr('src',''); }) ... Code (JavaScript): It has been quite long since I stopped playing with bootstrap though. Good luck
Thank you very much! When am trying on jdfiddle its working, once am putting the code into my website its not working
I guess there is another script that make your script not work, try to clean up your code first and start from there