Is there a way in jQuery to select all elements with "data-*" attribute name.
<div data-user="1">
<span data-name="Richard"></span>
<label></label>
</div>
Like on the sample HTML above I want to select data-user and data-name elements. The problem is "data-" attribute can be anything (like data-abc) that is why I want to select attributes with "data-*". I have looked at all jQuery attribute selector and cant find anything that does what I need. I cant use contains since text inside an element might have data- prefix.