0

In jQuery, I can look up an element with a specific data attribute value like so ...

$(myElt).find(`[data-slide='${current}']`)

but how would I lookup elements based on whether it contains the "data-slide" attributes, regardless of what the "data-slide" values are set to be?

Dave
  • 15,639
  • 133
  • 442
  • 830

1 Answers1

0

You can just write:

$(myElt).find(`[data-slide]`);
dubplay
  • 85
  • 1
  • 8