rpheath / searchbox

A live search plugin for jQuery.
97 stars 51 forks source link

h1. Searchbox

This is a jQuery plugin that turns any textbox into a live search, or a "searchbox".

h3. Usage

$('input.search').searchbox()

That's it, really. There are a few configuration options:

So, customizing each config option might look like this:

$('input.search').searchbox({
  url: '/your/search/url',
  param: 'q',
  dom_id: '#thumbnails',
  delay: 250,
  loading_css: '#spinner'
})

h3. Hooks

There are a few places you can hook into the plugin by binding a function to specific events. Here are the events:

Here's an example of how to make use of them:

$(document).bind('init.searchbox', function() { ... })

h3. License

(c) 2009 Ryan Heath, released under the MIT license