Test popup youtube

This commit is contained in:
nyanloutre 2017-07-19 13:20:15 +02:00
parent a04c5131cf
commit f0251b25e0
Signed by: nyanloutre
GPG Key ID: F85D93686A3A9063
1 changed files with 4 additions and 6 deletions

View File

@ -218,12 +218,10 @@
}
$('#youtubeModal').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget) // Button that triggered the modal
var youtube_id = button.data('youtubeid') // Extract info from data-* attributes
// If necessary, you could initiate an AJAX request here (and then do the updating in a callback).
// Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead.
var modal = $(this)
modal.find('.modal-body iframe')[0].src = 'https://www.youtube.com/embed/' + youtube_id
var button = $(event.relatedTarget);
var youtube_id = button.data('youtubeid');
var modal = $(this);
modal.find('.modal-body iframe')[0].src = 'https://www.youtube.com/embed/' + youtube_id + "?modestbranding=1&rel=0&controls=0&showinfo=0&html5=1&autoplay=1";
})
</script>