My checkBoxes are dynamic and I only need to check condition if my checkbox with "OTHERS" are clicked or not.So My checkboxes are:
<div class="form-group" id="documents">
<label> <input id="check_id1" type="checkbox" value="1" class="chk1" checked=""> <span>Invoice</span>
<br>
</label>
<div style="padding-bottom: 5px"></div>
<label> <input id="check_id2" type="checkbox" value="2" class="chk2" checked=""> <span>Packing List</span>
<br>
</label>
<div style="padding-bottom: 5px"></div>
<label> <input id="check_id3" type="checkbox" value="3" class="chk3" checked=""> <span>OTHERS</span>
<br>
</label>
<div style="padding-bottom: 5px"></div>
</div>
So i tried to check if the "Others" checkboxes is checked or not but alert() is not triggered.
if($("span:contains('OTHERS')").prop('checked') == true){
alert("here");
}