X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/6c9c6aa32a1b986128d7e5c2547d22d7a9f8d943..03715cba601c571ac35765daa5b6a97a004326cf:/src/wolnelektury/static/js/base.js?ds=sidebyside diff --git a/src/wolnelektury/static/js/base.js b/src/wolnelektury/static/js/base.js index 439ba1327..2d0ebbf64 100644 --- a/src/wolnelektury/static/js/base.js +++ b/src/wolnelektury/static/js/base.js @@ -66,6 +66,14 @@ }); + $('.carousel').on('cycle-before', function(event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag) { + $("iframe", outgoingSlideEl).attr("src", ''); + $("iframe", incomingSlideEl).attr("src", $("iframe", incomingSlideEl).attr('data-src')); + }); + $('.carousel section').first().each(function() { + $("iframe", this).attr("src", $("iframe", this).attr('data-src')); + }); + (function() { var $current = null;