X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/0a83a24ab2a3daf945c6012e80d284304a73c38b..0a637ce4b427eb7376f3902ab0e51cf274a8b1da:/src/wolnelektury/static/js/base.js diff --git a/src/wolnelektury/static/js/base.js b/src/wolnelektury/static/js/base.js index bdb5fbee7..2d0ebbf64 100644 --- a/src/wolnelektury/static/js/base.js +++ b/src/wolnelektury/static/js/base.js @@ -57,7 +57,7 @@ }) }); - $('.more').each(function () { + $('.more-expand').each(function () { $(this).shorten({ showChars: 150, moreText: "więcej", @@ -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;