0
When you click on the Reply link the code does not execute, it does not show the jQuery Alert or Function Alert, tbm does not show an error in the console, does not even execute.
$('#post-forum').last().append('<div><a href="#" id="responder" >Responder</a></div>');
$('#responder').on('click', function (event) {
// alert('teste');
teste();
event.preventDefault();
});
function teste() {
alert('teste');
}
Try changing the first line like this:
$('#post-forum').last().append('<div id="responder"><a href="#" >Responder</a></div>');
– Rene Freak
Thanks, I just tried, and tbm didn’t work, it tries to take the value of href.
– Fernando