Slider inside an table jquery

I am stuck with an slider here.

I have a products table and each line has an slider that increment percentage with the final price.

I am having trouble to select only the slider each line and calculate info for that same line.

The code bellow I could get the value from the slider and input on the price, but it is changing all the lines. I just need to change the line I am working on. Any ideas how to do that?

myRange – Slider ID

prod – table id;

.teste – price p tag;

//slider $ ('#prod').on('click', '#myRange', function () { var slider = document.getElementById('myRange'); slider.oninput = function() { $ ('#myRange').closest(".teste").html(slider.value); console.log(slider.value); //output.innerHTML = slider.value; } } );