I have multiple div's with same class and each dev has some input box. Whenever I change the value in input box, inside the div all the input boxes should the updated values in that particular div only not all the div's
<div class="select-guest__info table-responsive ">
<input class="js-qty" type="number" value="2" />
<input class="js-qty" type="number" value="2" />
<input class="js-qty" type="number" value="2" />
</div>
<div class="select-guest__info table-responsive ">
<input class="js-qty" type="number" value="1" />
<input class="js-qty" type="number" value="1" />
<input class="js-qty" type="number" value="1" />
</div>
I tried with
$('.select-guest__info .js-qty').each(function () {
$(this).val(val);
});
but all the input boxes are updating with the latest value.How Can I update only the inputboxes which are inside the div.
Regards, Sree.