X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/97c8c6d7c7961976172bece182832d01c9c0fc4b..0eedef1eafceaaa3f4f78b014236bf642be2807b:/src/wolnelektury/static/js/base.js diff --git a/src/wolnelektury/static/js/base.js b/src/wolnelektury/static/js/base.js index 2c2daa5f4..8f26db440 100644 --- a/src/wolnelektury/static/js/base.js +++ b/src/wolnelektury/static/js/base.js @@ -74,6 +74,14 @@ $("iframe", this).attr("src", $("iframe", this).attr('data-src')); }); + $(".carousel").each(function() { + opts = {}; + if ($('html').hasClass('media-eink')) { + opts.fx = 'none' + } + $(this).cycle(opts); + }); + (function() { var $current = null; @@ -168,6 +176,12 @@ }); $('.hoverclick').click(function() {$(this).closest('.hoverget').toggleClass('hover');}); + $('.hoverclick').keydown(function(event){ + var keyCode = (event.keyCode ? event.keyCode : event.which); + if (keyCode == 13) { + $(this).trigger('click'); + } + }); $(function(){ $("#search").search(); @@ -347,6 +361,20 @@ return false; }); + $("#id_method").val('payu-re'); + $(".methods .button").click(function() { + $("#id_method").val($(this).attr('data-method')); + $(".methods .button").removeClass('active'); + $(this).addClass("active"); + }); + + + $("#skiplink-search").click(function() { + console.log('skiplink search'); + $("#search").focus(); + return false; + }); + }); })(jQuery);