I want to select all elements with any data
attribute in jQuery. Is this possible? I know how to use wildcards in attribute values in the selector, but I can't find a way to use wildcards in the attribute name.
I can't use .data()
for this because it also matches other objects like the window. I only want to select elements with a data
attribute in the HTML.