Skip to content

This plugin allows you to give focus to the search field by typing the '/' (forward-slash) key.

Notifications You must be signed in to change notification settings

remybach/jQuery.slashSearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

jQuery Slash Search Plugin

About

This plugin allows you to give focus to the search field by typing the '/' (forward-slash) key.

Usage

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:

  1. charCode: Use this if you decide you want a character other than '/' to bring focus to your search field.
  2. 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"]').

License

MIT License - http://remybach.mit-license.org/

About

This plugin allows you to give focus to the search field by typing the '/' (forward-slash) key.

Resources

Stars

Watchers

Forks

Packages

No packages published