refer to http://rikrikrik.com/jquery/quicksearch/
Options
-
position
- Where the form is positioned in relation to attached.
- takes: ‘prepend’, ‘append’, ‘before’, ‘after’. default: ‘prepend’. attached
- Element to wish form is attached to.
- default: ‘body’ formId
- Id attribute of form
- default: ‘quicksearch’ labelText
- Text of form label
- default: ‘Quick Search’ labelClass
- Class attribute of label
- default: ‘qs_label’ inputText
- Text of input, will disappear on focus and reappear if field blank on blur.
- default: null inputClass
- Class attribute of input
- default: ‘qs_input’ loaderId
- Id attribute of loader
- default: ‘loader’ loaderClass
- Class attribute of loader
- default: ‘loader’ loaderImg
- Makes the loader an image if a string is given
- default: null loaderText
- Makes the loader an string of text if no image is given
- default: ‘Loading…’ stripeRowClass
- Adds a class to each element based on the array given
- default: null. takes: an array of text strings to be classes delay
- Keypress delay in milliseconds
- default: 500 focusOnLoad
- Focuses text input on page load
- default: false. hideElement
- Hides/stripes elements parent/grandparent instead of itself.
- default: null. takes: ‘parent’, ‘grandparent’ onBefore
- An optional function to be called before search
- default: null. takes: function() { } onAfter
- An optional function to be called after search
- default: null. takes: function() { } filter
- An optional function to edit the search string
- default: null. takes: function(i) { return i; } randomElement
- Adds a random string to quickSearch to differentiate between multiple searches
- default: ‘qs’+Math.floor(Math.random()*1000000) isFieldset New
- If you want a fieldset instead of a form, useful for developers using ASP.NET
- default: false fixWidths New
- If using a table, fix the widths of table cells to stop row widths jumping when searching
- default: false