Reputation: 37672
I need to find <div id="sometrack123456"></div>
by part of its id "track" using jQuery.
How I can do it?
Thank you!
Upvotes: 2
Views: 230
Reputation: 35541
You can try this:
$('div[id*="track"]')
See http://api.jquery.com/category/selectors for more info.
Upvotes: 2
Reputation: 95057
Try the attribute contains selector [attr*="str"]
$('div[id*="track"]').doSomething();
The quote order is important.
Upvotes: 5