HTML CODE
<tr class="roti">
<td class="ts" rowspan="2">
<input type="text" class="form-control totalSale" id="totalSaleAmountForRoti" name='totalSaleAmountForRoti' value="0" readonly>
</td>
</tr>
<tr class="roti">
column related class="form-control totalSale"
</tr>
What is the difference between them and their meaning?
var $class = $(this).parent().parent().attr('class');
1)
totalSale = $(this).parents('.' + $class).find('.totalSale');
2)
totalSale = $(this).parents('.' + $class).siblings('.' + $class + ':last').find('.totalSale');
And what meanings of this below code?
if ($(this).parent().siblings().children().hasClass('.totalSale')) { ... }
Aucun commentaire:
Enregistrer un commentaire