Tom Knowlton
asked on
find id attribute that has both phrases inside it
<span id="ctl09_gvRepair_ctl03_l blAmt1" style="border: 1px solid green;">1700.00</span>
using jQuery I want to find all spans where the id contains BOTH:
"gvRepair"
and
"lblAmt"
within the same id attribute.
How can I do this?
//pseudocode...
$('span[id*="lblAmt"] AND ALSO [id*="gvRepair"] ').each(function () {
using jQuery I want to find all spans where the id contains BOTH:
"gvRepair"
and
"lblAmt"
within the same id attribute.
How can I do this?
//pseudocode...
$('span[id*="lblAmt"] AND ALSO [id*="gvRepair"] ').each(function () {
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if you add a the same class to all your label you should be able to use :
$(".myLabelClass").each(fu nction() {
$(".myLabelClass").each(fu
ASKER
if you add a the same class to all your label you should be able to use :
$(".myLabelClass").each(function() {
Thank you! I'd forgotten about that!
ASKER
For my own notes:
Open in new window