HTML CODE
<table id="tablechkbx">
<tr>
<td>CITY <input value="5" id="datacell" type="checkbox"></td>
<td>DATE OF BIRTH <input value="7" id="datacell" type="checkbox"></td>
<td>DESIGNATION <input value="10" id="datacell" type="checkbox"></td>
<td>EMAIL <input value="1" id="datacell" type="checkbox"></td>
<td>GENDER <input value="12" id="datacell" type="checkbox"></td>
<td>INCOME LEVEL <input value="8" id="datacell" type="checkbox"></td>
<td>INDUSTRY OF EMPLOY <input value="9" id="datacell" type="checkbox"></td>
</tr>
<tr>
<td>KIDS <input value="13" id="datacell" type="checkbox"></td>
<td>MARITAL STATUS <input value="11" id="datacell" type="checkbox"></td>
<td>MOBILE NUMBER <input value="2" id="datacell" type="checkbox"></td>
<td>NAME <input value="3" id="datacell" type="checkbox"></td>
<td>NIC NUMBER <input value="6" id="datacell" type="checkbox"></td>
<td>TELEPHONE NUMBER <input value="4" id="datacell" type="checkbox"></td>
</tr>
</table>
Jquery
<script>
var tds;
$(document).ready(function(){
$('#btnselectall').on('click',function(){
$('#tablechkbx').find('tr').each(function(){
tds = $(this).find('td');
for(var k=0;k<tds.size();k++){
var data = tds[i];
console.log(data.next("#datacell").val());
}
});
});
});
</script>
I was try to get the checkbox value from above code but it's show an error like TypeError: data.next is not a function. But it will print all td element when it's use as console.log(data);
tablechkbxbut your selector is'#tbcheckbox'.class="datacell"instead ofid="datacell"on your inputstbcheckbox. Its copy past error.Because html table is very huge then I made smaller version from actual table structure.