I have two buttons that when clicked make the call of a .on('click',function())
but before that an AJAX request is made and after that request they do not work anymore. Before I did the function to make the request, it worked perfectly. This is the requisition:
$.ajax({
url: "teste.php",
type: 'GET',
success: function(html){
var headline = $(html).find('#teste');
$('#teste').html(headline);
}
});
and the button with .on('click')
is this:
$('.remove-item').on('click',function(){alert('teste')});