Neither docs on attribute selectors , or docs on data attributes gives any example or key to such a function.
Instead, it declares that the attribute selector consists of
[attr = value]
[Attr] Represents an element with the attribute name attr.
With options for comparing comparisons (for example, "starts with", "ends with", etc.), but only for value, never for the name attr .
So, if your goal is to add a custom cursor to each data-something element, you will need a different approach, perhaps providing them with specific classes.
LcSalazar
source share