Last active
June 14, 2017 09:36
-
-
Save erezLieberman/7f313c8d088b39bbbc37 to your computer and use it in GitHub Desktop.
stop and play youtube player inside bootstrap modal
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
$('.hp_videos .modal').on('hidden.bs.modal', function (e) { | |
var url = $(this).find('iframe').attr('src'); | |
$(this).find('iframe').attr('src',url); | |
console.log('close'); | |
}); | |
$('.hp_videos .modal').on('shown.bs.modal', function (e) { | |
var url = $(this).find('iframe').attr('src'); | |
$(this).find('iframe').attr('src',url); | |
console.log('open'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment