From c2548be8601dd2397daf718235312f07b9cec038 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 29 Oct 2017 10:57:34 -1200 Subject: [PATCH] iframes only load after being clicked --- js/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/js/index.js b/js/index.js index 79502357..8c86e4d2 100644 --- a/js/index.js +++ b/js/index.js @@ -32,3 +32,14 @@ if (btn) btn.addEventListener('click', fullscreen) $(document).ready(function(){ $('.carousel.carousel-slider').carousel({full_width: true}); }); + +$('iframe').each(function() { + this.tmp = this.src; + this.src = ''; + $(this).wrap('
') +}) +.parent('.iframe_block') +.click(function() { + let frame = $(this).children("iframe")[0] + frame.src = frame.tmp +})