I'm trying to implement a jQuery selector which selects all the elements with data-xy-* attributes. I know how to select elements if we know the complete data attribute:
$("[data-xy-a]")
will give me all the elements which have a data attribute data-xy-a
My problem is that the element can have any value instead of a
. I want something like:
$("[data-xy-*]")