Reputation: 137
I am wondering if i there is a way i can use this selector with dynamic value in jQuery.
$("[id$=someValue]")
so i can select all the elements that ends with this dynamic value in my HTML page
Upvotes: 0
Views: 2196
Reputation: 459
$('[id*="someValue"]')
if the id contains part of the expression inside the quotation marks.
Upvotes: 1
Reputation: 11042
$("[id$='someValue']");
Should work, note the value being enclosed in quotation marks.
Upvotes: 0