Jquery get values for P tag using id
-
table ekak thiyenawa.. eke eka row ekaka p tag dekak thiyenawa.. eke eka p tag ekaka value eka ganna one using p tag id.
<tr>
<td class="pro-thumbnail"><a href="#"><img src="assets/images/products/product01.jpg" class="img-fluid" alt="Product"></a></td>
<td class="pro-title"><a href="#">Cillum dolore tortor nisl fermentum</a></td>
<td class="pro-price"><span><p id="ProductPrize">28.00</p></span></td>
<td class="pro-quantity"><div class="pro-qty"><input type="text" value="1"></div></td>
<td class="pro-subtotal"><span><p id="totPrize">28.0</p></span></td>
<td class="pro-remove"><a href="#"><i class="fa fa-trash-o"></i></a></td>
</tr>id="ProductPrize" eke thiyena value eka jquery walin multiply karala id="totPrize" mekata assign karanna one
-
You cannot access multiple DOM element using same
id
. Because Id is unique for each element in entire DOM. So you can't use idProductPrize
in more than 1 row.I recommend you to use
data
attribute orhidden input fields
orjavascript array of object
. -
Ohh Thank you!! i'll do that way..