Created
April 15, 2014 17:18
-
-
Save abarza/10749323 to your computer and use it in GitHub Desktop.
Stop videos when you close the modal box
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(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