Hi..
How do I refresh element (div, class whatever) after another jquery action?
I have this action which is deleting a record from database and I need to refresh div which is fetching some other data from database as well...
Well here's code:
$(function() {
$(".delete").click(function() {
var commentContainer = $(this).parent();
var id = $(this).attr("id");
var string = 'id='+ id ;
$.ajax({
type: "POST",
url: "delete.php",
data: string,
cache: false,
success: function(){
commentContainer.slideUp('slow', function() {$(this).remove();});
}
});
return false;
});
});
Thanks for all help! :)