I have a check box list which enables multi select. i need to get the label of each check box instead of the value and do some work. if values are aaa &&& bbb i need to disable them (not allow user to check) and others i want to display as check able.
I have this piece of code written but doesn't work. I think I am missing something.
$('#ddcl-ddlOutcomeList-ddw input[type=checkbox]').each(function () {
console.log($(this).html());
});
ex:
<div class="ui-dropdownchecklist-item ui-state-default" style="white-space: nowrap;">
<input type="checkbox" tabindex="0" class="active" id="ddcl-ddlOutcomeList-i0" index="0" value="1444">
<label for="ddcl-ddlOutcomeList-i0" class="ui-dropdownchecklist-text" style="cursor: default;">No answer</label>
</div>
<div class="ui-dropdownchecklist-item ui-state-default" style="white-space: nowrap;">
<input type="checkbox" tabindex="1" class="active" id="ddcl-ddlOutcomeList-i1" index="0" value="1445">
<label for="ddcl-ddlOutcomeList-i1" class="ui-dropdownchecklist-text" style="cursor: default;">No answer 2</label>
</div>