Décharger vidéo fermuture popup
This commit is contained in:
parent
f0251b25e0
commit
0291167d2e
14
index.html
14
index.html
@ -163,14 +163,11 @@
|
|||||||
<div class="modal fade" id="youtubeModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
<div class="modal fade" id="youtubeModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
|
||||||
<h5 class="modal-title" id="exampleModalLabel">New message</h5>
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<iframe width="853" height="480" frameborder="0" allowfullscreen></iframe>
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<iframe width="100%" height="480" src="" frameborder="0" allowfullscreen></iframe>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -222,6 +219,9 @@
|
|||||||
var youtube_id = button.data('youtubeid');
|
var youtube_id = button.data('youtubeid');
|
||||||
var modal = $(this);
|
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";
|
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";
|
||||||
|
$(this + ' button.close').click(function () {
|
||||||
|
$(this + ' iframe').attr('src', "");
|
||||||
|
});
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user