Jquery events on Datatable
Jquery events on Datatable
Hi.
I a have problem triggering the click or actions in datatable.
If I use as normal JQUERY element, this break when I change to page 2 or another page.
By the way, time ago I found a example using drawCallback.
$('#tbl_usuarios').dataTable( {
'drawCallback': function(settings){
$('.user_link').on('click', function(){
alert('link press');
});
},
"paging": true,
"filter": true,
"info": true,
"lengthMenu": [[25, 10, 50, -1], [25, 10, 50, "All"]]
} );
The problem if when i order using the date or some header element the datatables make a new drawCallback and when I press a .user_link the message is showed a lot of times (the same that i reorder).
I don't found what is the correct method for use the events on datatable.
Thanks.
Answers
Top FAQ! :-)
Allan
I promise that I search on google before make this post, but i don't read the faq
Thanks for the reply.