Difference between revisions of "User:Jake/nookipedia-timeless.js"
From Nookipedia, the Animal Crossing wiki
(custom quick search) |
(fixing bug) |
||
Line 1: | Line 1: | ||
$(document).on('keydown', function (event) { | $(document).on('keydown', function (event) { | ||
− | if (event.which == 191 && event.target.id != 'searchInput') { | + | if (event.which == 191 && event.target.id != 'searchInput' && event.target.id != 'wpTextbox1') { |
$("#searchInput").focus().select(); | $("#searchInput").focus().select(); | ||
setTimeout(function(){ | setTimeout(function(){ |
Revision as of 14:33, June 2, 2021
$(document).on('keydown', function (event) {
if (event.which == 191 && event.target.id != 'searchInput' && event.target.id != 'wpTextbox1') {
$("#searchInput").focus().select();
setTimeout(function(){
$("#searchInput").val('');
}, 1);
}
});