jquery/jquery — pull request #566 by philmander (2011-10-28 22:48:30+00:00)
Title: hasAttrToken method for any attribute value using space-separated tokens

The HTML5 (and 4) spec states that the rel attribute's value must be a set space-separated tokens, like the class attribute. I want the mechanism for testing if a token is present in hasClass to be available for rel and ultimately any attribute. Many other attributes may also have values in this format.

I've added a new method to attributes.js, hasAttrToken. hasClass now uses hasAttrToken to check if a class is present.

hasAttrToken also has the option of being case insensitive, as rel values are ASCII case insensitive.