iframes only load after being clicked

This commit is contained in:
thepaperpilot 2017-10-29 10:57:34 -12:00
parent eb25744087
commit c2548be860

View file

@ -32,3 +32,14 @@ if (btn) btn.addEventListener('click', fullscreen)
$(document).ready(function(){ $(document).ready(function(){
$('.carousel.carousel-slider').carousel({full_width: true}); $('.carousel.carousel-slider').carousel({full_width: true});
}); });
$('iframe').each(function() {
this.tmp = this.src;
this.src = '';
$(this).wrap('<div class="iframe_block">')
})
.parent('.iframe_block')
.click(function() {
let frame = $(this).children("iframe")[0]
frame.src = frame.tmp
})