X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/74f7584b18b4386433b4c02336f5adafcae530c5..190a12c5524f533a5fa74569575cccf22f745847:/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 377a969c0..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(); @@ -362,6 +368,13 @@ $(this).addClass("active"); }); + + $("#skiplink-search").click(function() { + console.log('skiplink search'); + $("#search").focus(); + return false; + }); + }); })(jQuery);