Good night, I have a jquery table where in a column I return a button
{ "data" : 'sla.value', 'render': function ( data, type, full, meta ) {
return ' <button id="show" type="button">Click</button>'; }
After closing the });
of the table comes a simple alert (all within $ (document) .ready):
$('#show').click(function(){
alert('oi');
});
But when clicking nothing happens, if you inspect the button it will appear the id show . The same thing happens if I put onclick="metodo();"
right on the element and create this method down, in console it informs that 'method' was not found. Any idea? It sounds simple but I'm stuck with it. vlw