I have HTML elements with custom data attributes that has different ending but starts the same (not the value but the attribute name itself). These attributes may have value or not. How could I select all of them?
<div data-validator-required> DIV 1</div>
<div data-validator-number="5.2"> DIV 2</div>
<div data-validator-submit> DIV 3</div>
<div data-validator-pattern="\d{5}-\d{3}-\d"> DIV 4</div>
I want to select all elements that has a data attribute with the name "data-validator-*
" What is the correct jQuery selector for this?