GithubHelp home page GithubHelp logo

anthrax3 / jquery-fastlivefilter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from awbush/jquery-fastlivefilter

0.0 0.0 0.0 116 KB

A live filter plugin for jQuery that is built for speed and ease of use.

Home Page: http://anthonybush.com/projects/jquery_fast_live_filter/

License: BSD 2-Clause "Simplified" License

JavaScript 100.00%

jquery-fastlivefilter's Introduction

What

This is a live filter plugin for jQuery that is built for speed and ease of use. It was made because existing tools were inadequate (too slow, wrong feature set). Check out the demo and comparison pages.

Usage

Include jQuery, the plugin, then initialize the plugin:

<script src="jquery-1.6.4.min.js"></script>
<script src="jquery.fastLiveFilter.js"></script>
<script>
	$(function() {
		$('#search_input').fastLiveFilter('#search_list');
	});
</script>

The above would work with this HTML:

<input id="search_input" placeholder="Type to filter">
<ul id="search_list">
	<li>One</li>
	<li>Two</li>
	<li>Three</li>
</ul>

Options

Options are given as the second argument. Synopsis:

$(INPUT_SELECTOR).fastLiveFilter(LIST_SELECTOR, options);

Available options:

  • timeout: How many milliseconds to wait after keydown before filtering the list. Default is 0.
  • callback: A callback method which will be given the number of items left in the list.
  • selector: By default, the plugin will match the filter against the text of the li. If specifed, the selector will be applied to the li and the resulting text will be used instead. WARNING: Use of complex selectors may reduce performance significantly, especially in large lists!

Example:

$('#search_input').fastLiveFilter('#search_list', {
	timeout: 200,
	callback: function(total) { $('#num_results').html(total); }
});

Problems? Want to contribute?

Report issues on github. Use pull requests to contribute code. Versioning will be done as defined by Semantic Versioning.

jquery-fastlivefilter's People

Contributors

awbush avatar claviska avatar nicholasbs avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.