diff options
Diffstat (limited to 'public/libs/search.js')
-rw-r--r-- | public/libs/search.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/public/libs/search.js b/public/libs/search.js new file mode 100644 index 0000000..704a0e1 --- /dev/null +++ b/public/libs/search.js @@ -0,0 +1,6 @@ +$('#srchBtn').on('click', (e) => { + e.preventDefault(); + const q = $('#srchInpt').val(); + $('#searchForm').attr('action', `/search/${q}`); + $('#searchForm').submit(); +});
\ No newline at end of file |