search: make dropdown stick to search field when scrolling #155

This commit is contained in:
Sören Weber 2021-11-16 01:16:31 +01:00
parent 26a697ffe5
commit cba76c3f41
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589
2 changed files with 3 additions and 1 deletions

View file

@ -104,6 +104,7 @@ textarea:hover, input[type="email"]:hover, input[type="number"]:hover, input[typ
text-align: center; text-align: center;
border-bottom: 4px solid #9c6fb6; border-bottom: 4px solid #9c6fb6;
padding: 1rem; padding: 1rem;
position: relative;
} }
#header a { #header a {
display: inline-block; display: inline-block;

View file

@ -65,7 +65,8 @@ initLunr();
$(function() { $(function() {
var searchList = new autoComplete({ var searchList = new autoComplete({
/* selector for the search box element */ /* selector for the search box element */
selector: $('#search-by').get(0), selectorToInsert: '#header-wrapper',
selector: '#search-by',
/* source is the callback to perform the search */ /* source is the callback to perform the search */
source: function(term, response) { source: function(term, response) {
response(search(term)); response(search(term));