I want to create a new datatable but when I try to add jQuery "click()" function its not really working. For Example:
$('#dataTable').DataTable();
$('.example').on('click', function(){
    alert("This is not working");
})
This will not work. But if I create a drawcallback function:
$('#dataTable').dataTable({
    "drawCallback": function() {
        $('.example').on('click', function(){
            alert("This will work");
        })
    }
}); 
Its working perfectly. Where I make a mistake? How can I make functions work without calling drawcallback? Thank you! Have a nice day!
 
    