Trying to get a count of each label element that has the class "active
" and it's input attr, "data-price
", contains just a number/price between the [""]
.
So, if tot element count is > 0, do something...
HTML
<ul class="elem-ul">
<li class="elem-li">
<label class="elem-label active">
<input class="elem-input" data-price="["100"]" type="checkbox">
</label>
</li>
<li class="elem-li">
<label class="elem-label active">
<input class="elem-input" data-price="["400"]" type="checkbox">
</label>
</li>
<li class="elem-li">
<label class="elem-label active">
<input class="elem-input" data-price="[""]" type="checkbox">
</label>
</li>
<li class="elem-li">
<label class="elem-label">
<input class="elem-input" data-price="[""]" type="checkbox">
</label>
</li>
</ul>
Aucun commentaire:
Enregistrer un commentaire