I have a modal delete confirmation now I want to change confirmation to use jQuery Modal. Here is my:
$('.stdelete').live("click", function() {
var ID = $(this).attr("id");
var uid = $("#uid").val();
var dataString = 'msg_id='+ ID + '&uid=' + uid;
if (confirm("Sure you want to deletes this update? There is NO undo!")) {
$.ajax({
type: "POST",
url: "delete_message_ajax.php",
data: dataString,
cache: false,
success: function(html) {
$("#stbody"+ID).slideUp();
}
});
}
Anyone have an idea? Thanks for any help.
$('.stdelete').live("click",function() {
var ID = $(this).attr("id");
var uid = $("#uid").val();
var dataString = 'msg_id='+ ID + '&uid=' + uid;
var d = $('<div />').append('Sure you want to deletes this update? There is NO undo!').dialog({
buttons: {
'no': function() {
$(this).dialog('close');
},
'yes': function() {
$.ajax({
type: "POST",
url: "delete_message_ajax.php",
data: dataString,
cache: false,
success: function(html){
$("#stbody"+ID).slideUp();
}
});
$(this).dialog('close');
}
}
});
$('body').append(d);
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.