Skip to main content
5 of 7
added 32 characters in body

You have to inject the value of current into an Attribute Equals selector:

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

For older JavaScript environments (ES5 and earlier):

$("ul").find("[data-slide='" + current + "']"); 
Frédéric Hamidi
  • 263.8k
  • 42
  • 497
  • 486