I want to set a variable (pageselected) as per the checkbox click/unclick
event.
The HTML code is :
<thead>
<tr id="othercheckbox">
<th width="10"><input type="checkbox" name="zip" class="all" value="all" /></th>
</tr>
</thead>
The code in JS file is :
$('#othercheckbox').click(function() {
if($(this).is(':checked')){
console.log("CCCCheckeddddddd");
that.pageselected = true;
}
else
{
console.log("UNCheckeddddddd");
that.pageselected = false;
}
}
But this is not behaving as expected. Where am I going wrong?