Class Index | File Index

Classes


Class jQuery.fn

See the jQuery Library (http://jquery.com/) for full details. This just documents the function and classes that are added to jQuery by this plug-in.
Defined in: jquery.wordFilter.js.

Class Constructor Summary
Constructor Attributes Constructor Name and Description
 
See (http://jquery.com/)
Method Summary
Method Attributes Method Name and Description
<static>  
jQuery.fn.autoSearch(selector, options)

Hide or show information on a page based on words typed into a textbox.

<static>  
jQuery.fn.wordFilter(words, options)

Remove all elements from the set of matched elements using a a set of words and options settings.

Class Constructor Detail
jQuery.fn()
See (http://jquery.com/)
Method Detail
<static> jQuery.fn.autoSearch(selector, options)

Hide or show information on a page based on words typed into a textbox. Works like an automatch suggestion field to only display the 'selector' elements that match what is typed. This occurs "close" to real time. For performance reasons, the wordFilter is only applied after the user has stopped typing (or presses enter or a space).

$('#searchTextBox').autoSearch('.searchItems');
Parameters:
selector
The jQuery selector that determines the elements to search
options
The wordFilter options to use.
options.searchCallback
A function that will be called with each keystroke in the search textbox. Will be passed a modified options object with lastSearch and hiddenCount properties.
options.wait
The time in milliseconds to wait before assuming typing has stopped. Default: 750ms
See:
jQuery.fn.wordFilter for other options.

<static> jQuery.fn.wordFilter(words, options)

Remove all elements from the set of matched elements using a a set of words and options settings. The default is to show return only elements that contain all the specified words. However, the options can be used to change this to be be any word or the inverse match.

The example below will only show paragraphs that contain both the words foo and bar.
$('p').hide().wordFilter(['foo','bar']).show();
Parameters:
words
An array of words to filter the selected items by.
options
An optional options object.
options.useOr
If true, show selections that contain ANY single word in the list. If false, (default) only show selections that contain ALL the works in the list.
options.invert
If true, invert the selection display. I.e., don't show selection if it contains words.
options.matchType
Can be three values, "whole", "prefix", or "contains". "whole" (default) means the whole word must be matched. "prefix" means that any word that starts with the word is matched. "contains" means that any word that contains the word is matched. Note that contained may match HTML tags as well.
options.ignoreCase
If false, the case of the word must match. If true, (default) the case is ignored.
options.skipHidden
If true, any element that is already hidden is skipped. Makes for faster drill down searches in autoSearch. Default is false.

Documentation generated by JsDoc Toolkit 2.0.2 on Tue Jan 13 2009 15:20:09 GMT-0500 (EST)