Level 13
@dan3460 ok try this
$("#tableId").on("click", ".activeAccount", function(){
// your code here
});
for more info
I have an application that implements yajra datatables. In one of the columns i have a button that when clicked send an email. The button has a class that i use to trigger the action:
$(".salesperson").on('click', function(){
console.log('salesperson');
customerNumber = customers.row($(this).closest('tr')).data()[11];
console.log(customerNumber);
$.get('/credit/'+customerNumber+'/notifySalesperson');
$(this).css("background-color","red");
});
The datatable has pagination. My problem is that when i go to the second page or beyond, the function is not triggered anymore. Any ideas. I don't know what is happening when the button is clicked.
@dan3460 ok try this
$("#tableId").on("click", ".activeAccount", function(){
// your code here
});
for more info
Please or to participate in this conversation.