Skip to content

Commit 542c4ce

Browse files
authored
Merge pull request tailwindlabs#151 from vmitchell85/master
Add Shortcut to search
2 parents 30e5711 + 08bbc74 commit 542c4ce

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/source/_assets/js/app.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,9 @@ const app = new Vue({
1313
Prism.highlightAll()
1414
anchors.options = { placement: 'left', class: 'text-slate-light' };
1515
anchors.add();
16+
17+
document.onkeyup = function (e) {
18+
if (e.which == 191) {
19+
document.getElementById('docsearch').focus();
20+
}
21+
};

0 commit comments

Comments
 (0)