RegEx

Parse class values: Retrieving custom meta data from an HTML element's class name

The problem

I had HTML that had class information on each object that signified how deeply it was indented (e.g. "indent-5"). I needed to use the value of the indent to make various comparisons in another. To solve this problem I created a simple utility function.

NOTE: All functions were written with a dependancy on jQuery.

Subscribe to RSS - RegEx