$("#button_title_delete").click(function(){
jQuery.ajax({type:'POST',
url:'delete.php',
data: 'id='+$("bid").val(),
success: function(veri) { $("#delete_result").html(veri);}
});
});
When i click the button with “button_title_delete” id, this function works for only one time. What am i doing wrong? How should i fix this problem?
Probably because you’re replacing the button on the
successcallback of your AJAX function. You need to use jQuery’s.on()method to attach the click event.