Thursday, 4 April 2013

jQuery: Select all ID's start with a specific string


[id^=product]

^= indicates "starts with". Conversely, $= indicates "ends with".

The symbols are actually borrowed from Regex syntax, where ^ and $ mean "start of string" and "end of string" respectively.

No comments:

Post a Comment