<p class="item" data-price="2" data-qty="1">item 1</p>
<p class="item" data-price="12" data-qty="4">item 2</p>
<p class="item" data-price="4" data-qty="2">item 3</p>
how to sum the price and qty of above item using loop? I know how to get the value at times its quantity but how to loop over them?
parseInt($('.item').attr('data-price')) * $('.item').attr('data-qty')