RSS 2.0 Feed
Posted on April 19th, 2010 at 07:07 AM by Corey Ballou

The getMatchingClass plugin is useful for determing whether a singular matching element contains a particular partial class name. The idea behind the function is to allow for partial matching using the following jQuery selectors:

  • $= – “ends with” selector
  • ^= – “starts with” selector
  • *= – “contains” selector
  • = – “matches” selector

The plugin is useful in the event you need to determine if an element contains a portion of a class name utilizing already known jQuery selectors. Unfortunately this functionality did not exist within the Sizzle selector engine. Improvements and bugfixes are always welcome. more »