Skip to content

Instantly share code, notes, and snippets.

@AshikNesin
Created June 16, 2017 06:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AshikNesin/0eb5cfb89daee7e63185bcde4aa4c4e7 to your computer and use it in GitHub Desktop.
Save AshikNesin/0eb5cfb89daee7e63185bcde4aa4c4e7 to your computer and use it in GitHub Desktop.
Stop video if the model is closed
$(document).ready(function(){
$('.modal').each(function(){
var src = $(this).find('iframe').attr('src');
$(this).on('click', function(){
$(this).find('iframe').attr('src', '');
$(this).find('iframe').attr('src', src);
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment