This plugin allows you to give focus to the search field by typing the '/' (forward-slash) key.
All you need to do is include Slash Search after jQuery and then include the following:
jQuery(function($) { $(document).slashSearch(); });
You can pass in any of the following two options as part of an options object as well:
- charCode: Use this if you decide you want a character other than '/' to bring focus to your search field.
- selector: By default, the plugin will try to find the search field by the HTML5 'search' input type. Failing that, it will try using this jQuery selector (which defaults to '[name="search"]').
MIT License - http://remybach.mit-license.org/