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 + "']"); For support of both jQuery and attribute set data values
$("ul").find(function () { return $(this).data('slide') === current });