I have current html:
<input id="dynamic1" data-group-animal="y1,y2" /> <input id="dynamic2" data-group-vegetable="y3,y4" />
These are independent divs that can be shared or not when sending data via ajax.
Now I have one use case for both fields, and I need to get data-value for both options based on some parameters. the data attribute is different (used for different purposes - I can send either not all groups or separately)
so i want:
$('input').data('group*') but this does not work, then I understand that I need a regular expression.
Does regexp exist for a data attribute that I can use?
Pat r ellery
source share