I have two arrays.
The first array (idContainerArray)
contains the ids of the checkboxes I selected across pages.
The second array (idArray)
will contain the Ids of the checkboxes of the current page.
I want to compare those two arrays and if a match is found then check the corresponding checkbox on the current page.
The below code execute without errors but won't check the boxes.
jquery :
var idArray = [];
var idContainerArray = [];
$.each(idArray, function (i, el) {
if ($.inArray(el, idContainerArray) != -1) {
$(el).prop("checked", true);
}
});