Swift Filter jQuery plugin Documentation by SWTE v1.0

Swift Filter jQuery plugin

Created: 26/9/2015
Email: support@swte.ch

Thank you for purchasing our plugin. If you have any questions that are beyond the scope of this help file, please feel free to email us via our user page contact form here.

Table of Contents

  1. Overview
  2. Basic usage
  3. Customization

A) Overview - top

With the Swift Filter plugin you can make any number of separate or connected custom filters in your project.

You can use any HTML input (text, radio, checkbox) or select elements as filter. You can set the container of the search, and the results by CSS selectors.

B) Basic usage - top

Call the plugin with javascript


Call the plugin with "swiftfilter" class

<input type="text" class="swiftfilter">

C) Customization - top


Variable Default Type Description
container html string CSS selector for the container where the filtering will be applied
searchIn article string CSS selector for elements where the filter will run. If the filter doesn't match the plugin will hide this container with the selected method. If the filter matches the plugin will unhide this element.
child string * CSS selector for child elements inside "searchIn" container. By default the plugin search inside all child elements
childOnly boolean false If this value is true the filter won't check the "searchIn" container's content. The filtering will be applied only on child elements. If the filter doesn't matches in the childrens the plugin will hide the "searchIn" container
autocomplete boolean true Autocomplete for text fields
typeEnd integer 0 Delaying the hide effect after the last keyup event. Every keyup event clears the timer. Works for text inputs only
show string fadeTo jQuery effect to show matched elements
hide string fadeTo jQuery effect to hide unmatched elements
durationShow integer 500 Duration for "show" jQuery effect
durationHide integer 500 Duration for "hide" jQuery effect
showParam string|int empty string Custom parameter for custom "show" jQuery effect (eg: class name for addClass/removeClass)
hideParam string|int empty string Custom parameter for custom "hide" jQuery effect (eg: class name for addClass/removeClass)
opacity float 0.2 Opacity value for fadeTo effect
connect string|null null CSS selector of connected swiftfilter field(s)
compare string in Compare method:
  • in - contains the value
  • not_in - doesn't contain the value
  • equals - exact match
  • gt - grater than (numeric)
  • lt - less than (numeric)
  • gte - grater than or equals (numeric)
  • lte - less than or equals (numeric)
  • between - between the defined range eg: 10-20 (numeric)

Using data attributes

All options can be passed as data attribute
<input class="swiftfilter" id="menu-vegan" type="checkbox" value="vegan" data-child=".label" data-child-only="true">

Once again, thank you so much for purchasing this plugin. As we previously mentioned, we would be glad to help you if you have any questions related to this plugin. If you have a more general question related to the plugin on CodeCanyon, you might consider visiting the forums and asking your question in the "Item Discussion" section.


Go To Table of Contents