quickSearch jQuery plug-in
Examples
- Afghanistan
- Albania
- Algeria
- American Samoa
- Andorra
- Angola
- Anguilla
- Antarctica
- Antigua and Barbuda
- Argentina
- Armenia
- Aruba
- Australia
- Austria
- Azerbaijan
Example uses following code:
$('ul#list_example li').quicksearch({
position: 'before',
attached: 'ul#list_example',
loaderImg: 'loader.gif',
focusOnLoad: true
})
More examples
Usage
$(search_elements).quicksearch(options);
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'
- randomElement
- Adds a random string to quickSearch to differentiate between multiple searches
- default: 'qs'+Math.floor(Math.random()*1000000)
Download