javascript - Jquery - Datatables - Capture Element -
i have question. javascript.
i'm trying capture click in table.
i did so:
"fndrawcallback" : function() { $('#example tbody').on('click', 'tr', function () { var id_val = $('td', this).eq(0).text(); alert(id_val); } ); }
this works well. problem is: in last column, have checkbox, when click, event occurs, how add not condition?
tried this:
$('#example tbody').on('click', ':not(.checkbox)', function () {
but did not work.
for checkbox have this:
$('#example tbody td').on('click',':checkbox',function() { alert('message'); });
any suggestions?
thanks.
this work:
$('td.readonly').on('click', function () { alert('not checkbox'); }); $('td.checkbox').unbind('click').on('click', function () { alert('checkbox'); });
Comments
Post a Comment