Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Using JQuery, how can I select all the elements with an attribute 'data-val="MyVal"' ?
Posted
Updated 27-Dec-12 23:03pm
v2

1 solution

Hi , for example you can achive it by next:
$("ul").find("[data-val='" + "MyVal" + "']");


Also you can try to laverage such tip:

$(this).nextAll('div[data-val="'+MyVal+'"]')

where div is a container wich is included in serach loop
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900