stonedeft — 2011-07-21T12:13:37-04:00 — #1
In JQuery how do you select all elements using regex.
I have this markup
How do I select all id's starting with td_
immerse — 2011-07-21T13:03:57-04:00 — #2
I think you need the attribute-contains-selector: [Attribute Contains Selector [name*="value"] – jQuery API](http://api.jquery.com/attribute-contains-selector/)
stonedeft — 2011-07-21T13:58:04-04:00 — #3
Wow thats easier than a regex solution. Thanks
paul_wilkins — 2011-07-21T19:21:26-04:00 — #4
If you want to ensure that it doesn't accidentally match with something in the middle of the name, you can use the attribute-starts-with selector instead:
It also makes things easier for you or others who come back to the code, because you can tell immediately what the code is expected to achieve.
immerse — 2011-07-22T03:20:15-04:00 — #5
Ooh, even better! Hadn't seen that one. jQuery is amazing (hope DS60 doesn't read this )