X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/032a2b1bdcecc42056de4a0171a55d173e4b765b..03715cba601c571ac35765daa5b6a97a004326cf:/src/wolnelektury/static/js/base.js diff --git a/src/wolnelektury/static/js/base.js b/src/wolnelektury/static/js/base.js index 1cb62a485..2d0ebbf64 100644 --- a/src/wolnelektury/static/js/base.js +++ b/src/wolnelektury/static/js/base.js @@ -57,6 +57,22 @@ }) }); + $('.more-expand').each(function () { + $(this).shorten({ + showChars: 150, + moreText: "więcej", + lessText: "mniej" + }); + }); + + + $('.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() {