I have a list of checkboxes while selecting checkboxes i have to add the values to arrays and while unchecking i have to remove that from array.
following code am using. but it is not deleting while unchecking
<tr><td class="tdstyleSelect"><input type="checkbox" name="joblist" onclick="toNfroVmps(this.id);" id="' + i + '" checked>
var toNfroVmps = function(id) {
if($('#' + id).is(':checked'))
elementIds.push(id);
else
delete elementIds[elementIds.indexOf(id)]
}