Skip to content

JamesRBrown/jquery.search.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jquery.search.js

About:

jQuery Search is a fast and light weight jQuery DOM search tool. I was looking for a filter search tool and everything I found was slow, cumbersome, and feature poor. jQuery Search is lightning quick, intuitively behaves exactly as you'd expect of a jQuery tool, and because it's a jQuery plugin it automatically benifits from jQuery rich chainability approach!

Installation:

Like any jQuery plugin, simply include the script in your project after you include jQuery (v1.1.4+).

Version 2 Features:

Provides new case insensitive search functionality.

The new methods are:

iAndSearch

iOrSearch

iSearch

(Works the same as the below described methods except case is ignored.)

Please note: there might be a slight performance hit using the case insensitive search over the regular case sensitive search.

The jQuery Search plugin provides three methods:

andSearch – This operates by evaluating a search string as a series of space delimited search terms that are ANDed together, similar to iTunes’ filter search.

orSearch – This is similar to the andSearch except that the terms are ORed together.

search – This is a simple search that tries to match the search string, treating spaces as part of a single search term.

Examples:

Elm1: <div class=”search”>The quick brown fox</div>

Elm2: <div class=”search”>The slow red dog</div>

Elm3: <div class=”search”>The squirrel is quickest</div>

$(‘.search’).andSearch(‘The quick’)

Returns: Elm1 and Elm3

$(‘.search’).orSearch(‘The quick’)

Returns: Elm1, Elm2, and Elm3

$(‘.search’).search(‘The quick’)

Returns: Elm1

About

Provides an iTunes like filter search among others.

Resources

License

Stars

Watchers

Forks

Packages

No packages published