<div class="product-section__information_quantity">
<input name="count_product" type="text" value="50">
<input name="count_product" type="text" value="1000">
<button class="click">click</button>
</div>
var allCountInform = 0;
$(document).ready(() => {
$(document).on('click', '.click', function () {
allCountInform = 0;
$(this).closest('.product-section__information_quantity').find("input[name=count_product]").each( function () {
allCountInform = allCountInform+parseInt($(this).val());
});
alert(allCountInform);
});
});
This Pen doesn't use any external CSS resources.