if (e.which === 38) {
                // up arrow key
                selected.prevAll("li:not(.search-hide)").first().click();
                e.preventDefault();
                flag = true;