diff --git a/src/interface/static/js/pyshelf_ux.js b/src/interface/static/js/pyshelf_ux.js index f846b49..fcadd24 100644 --- a/src/interface/static/js/pyshelf_ux.js +++ b/src/interface/static/js/pyshelf_ux.js @@ -4,4 +4,12 @@ $(document).ready(function(){ console.log(query); window.location.href = '/search/'+query; }) + $('.nav_search').on('keypress', function (e) { + if(e.which === 13){ + $(this).attr("disabled", "disabled"); + var query = $('.nav_search').val(); + window.location.href = '/search/'+query; + $(this).removeAttr("disabled"); + } + }); })