我现在有一个模态删除确认我想更改确认以使用jQuery Modal。这是我的:
$('.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();
}
});
}
有人有想法吗? 谢谢你的帮助。
答案 0 :(得分:0)
$('.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);
});