I am using JQuery DataTables to allow the user the ability to set stores as Active (checked) or inActive (not checked). I need a way of capturing the ID (hidden column) and the check value (checked or unchecked).
I have this function which I thought would do it, but nothing is being written tot he console.
$('#tblAddRemoveStores').on('change', 'tbody input.editor-active', function () {
var data = table.row( $(this).parents('tr') ).data();
cb = $(this).prop('checked');
console.log(data.id + ' ' + cb);
});
And here is a codepen of full syntax that illustrates what I'm after. https://codepen.io/chalupabatman/pen/VwwyaYv
Aucun commentaire:
Enregistrer un commentaire