How to get values of checkbox on table

How to get values of checkbox on table

soukainasoukaina Posts: 1Questions: 1Answers: 0

Hello
I have a big problem, I cannot get the values of every chekbox on table, i get just values of the page on focus even if I check other checkbox on others page, it doesn't work , i want to get every values checked,this is what i done
(
function checkbox() {
var data =[];
$('.person_data').each(function() {
if(this.checked == true){
data.push(this.value);
}
});
var str = data.join(', ');
$.ajax({
url : 'getcheck',
method : 'get',
ContentType : 'json',
data : {
check : str
},
success : function(response) {
}
});
}

<input checkbox path="evolutions" class="person_data" value="${evol.idEvol}"/>

)

This discussion has been closed.