0
I need to list all attributes data
containing a code on their behalf (not in value).
Example of HTML tag with attributes:
<input type="hidden" id="products-end" data-flavor-id-15515-1="abc" data-flavor-pr-15515-1="abc" data-flavor-id-15515-2="abc" data-flavor-pr-15515-2="abc">
When searching for 15515-1
it would bring all the data related to their respective information, in the case, the abc
(I just put it to the test).
I’m using jQuery and using attr()
to insert, however, I can switch to the data()
if necessary.
Could someone help me?
Thank you so much for your help. I didn’t get to test because it already worked on @Alanrezende, but thank you anyway.
– Marco Garcia