Kod
jQuery.fn.delete_school = function (id) {
var that = $(this);
$('.usun').live('click', function () {
$.post("/ajax/AjaxUpdateData.php", {
remove: id
}, function (data) {
if (data.status == 'success') {
$('#info_upd_data').fadeOut(200,function(){
$(this).removeClass('response-waiting').addClass('response-success').text('blabla').fadeIn(200,function(){
setTimeout(function(){
responseMsg.fadeOut(200,function(){
$(this).removeClass('response-success');
});
},3000);
});
});
that.parents('#TableShowEducation').remove();
} else {
$('.stop').click();
}
}, 'json');
});
});
};
var that = $(this);
$('.usun').live('click', function () {
$.post("/ajax/AjaxUpdateData.php", {
remove: id
}, function (data) {
if (data.status == 'success') {
$('#info_upd_data').fadeOut(200,function(){
$(this).removeClass('response-waiting').addClass('response-success').text('blabla').fadeIn(200,function(){
setTimeout(function(){
responseMsg.fadeOut(200,function(){
$(this).removeClass('response-success');
});
},3000);
});
});
that.parents('#TableShowEducation').remove();
} else {
$('.stop').click();
}
}, 'json');
});
});
};
oraz:
$status = "success"; $message = "Szkoła została usunięta."; } } 'status' => $status, 'message' => $message ); exit;