1. Code
  2. JavaScript

Dissecting jQuery – Filters

Scroll to top
Read Time: 1 min

Sporadically, over the course of each month, we’ll post a “Dissecting jQuery” video quick tip. The idea behind these is that we’ll take a single chunk of the jQuery source at a time, break it down, and determine exactly what’s going on under the hood, so to speak. Then, with that knowledge, we’ll learn how to better utilize the library in our coding. Today, we’ll review filters.

Also available in this series:

  1. Dissecting jQuery – Filters
  2. Dissecting jQuery – The Text Method

jQuery’s Source for the :hidden Filter

The :visible Filter

Quite cleverly, the :visible filter only needs to call the hidden method, and return the reciprocal.

Full Screencast

);"> jQuery source code to view a listing of other helpful filters that are available to you.

Harnessing this Knowledge to Extend jQuery

Note: jQuery.expr[':'] is simply an alias for jQuery.expr.filters.

Stay tuned. In future episodes, we’ll continue to slice out more chunks of the jQuery source, and dissect them!
Did you find this post useful?
Want a weekly email summary?
Subscribe below and we’ll send you a weekly email summary of all new Code tutorials. Never miss out on learning about the next big thing.
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.