Reputation: 4559
I have some labels, like:
<label>Some words</label>
<label>Some other words</label>
<label>Yet another words</label>
How can I get labels starting with "Some" (or other text?). I tried
$("label").filter('html^="Some"')
//or
$("label").filter('text^="Some"')
but it doesn't seem to work (returns empty list). It's more complicated in my real problem so maybe I made some other mistake, but maybe I'm doing it totally wrong? Is any of these a good way to do it? What's the best way?
Upvotes: 7
Views: 1965