X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/e89f0663d3ef7ccbf2b51e400430695fb2421b6f..af339a5c1a69ec22a6f1d5940cde313953948368:/src/wolnelektury/static/js/base.js diff --git a/src/wolnelektury/static/js/base.js b/src/wolnelektury/static/js/base.js index 7d311fce3..8f26db440 100644 --- a/src/wolnelektury/static/js/base.js +++ b/src/wolnelektury/static/js/base.js @@ -176,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(); @@ -355,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);