mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
search: make dropdown stick to search field when scrolling #155
This commit is contained in:
parent
26a697ffe5
commit
cba76c3f41
2 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||||
|
|
|
@ -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));
|
||||||
|
|
Loading…
Reference in a new issue