You have to check the database and see if a 0 or 1 is stored, and code it checked or not checked, a discussion on checkbox handling was recently discussed here.
Jul 3, 2017
4
Level 4
How to persist checkbox checked state after div content reload?
I have a pagination for div which during go to another pages the previous checkbox state will lost.
var id;
$("#list :checkbox").each(function(e){
id = this.id;
console.log(this.value);
});
Code above can get all the value in a div tag if without button click.
If i use the code below, it only shows the data for the page 1.
$("#select-all").click(function(e) {
var id;
$("#list :checkbox").each(function(e){
id = this.id;
console.log(this.value);
});
});
I am not using datatable to display data, i am using div tag to display 6 items per page, but i always get the value only where the current page is active. Any solution to solve the issue?
Please or to participate in this conversation.