Sticky autocomplete
This commit is contained in:
parent
edeece9d7c
commit
42c1f0aedc
|
@ -18,6 +18,7 @@ $(document).ready(() => {
|
|||
let searchBar = $('#search-bar');
|
||||
|
||||
searchBar.autocomplete({
|
||||
appendTo: '#search-form',
|
||||
source: (request, response) => {
|
||||
$.ajax({
|
||||
url: '/langs/polish/words?like=' + request.term + '&limit=20&offset=0',
|
||||
|
@ -31,10 +32,6 @@ $(document).ready(() => {
|
|||
setTimeout(() => e.currentTarget.select(), 100);
|
||||
});
|
||||
|
||||
$(window).on('scroll', () => {
|
||||
searchBar.autocomplete('close');
|
||||
});
|
||||
|
||||
$('#search-form').on('submit', (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
|
|
Loading…
Reference in New Issue