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'); }); 

jsfiddle example


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -