第一个函数(可在http://nadiana.com/jquery-confirm-plugin找到):如何结合两个jQuery函数?
$('#confirm').confirm(
{
msg: 'You are about to delete gallery and all images related to that gallery. Are you sure?<br>',
buttons: {
separator: ' - '
}
}
);
基本上没有是/否的问题,如果你回答是,它进一步进行。
二级功能:
$(document).ready(function() {
$('#load').hide();
});
$(function() {
$(".delete").click(function() {
$('#load').fadeIn();
var commentContainer = $(this).parent();
var id = $(this).attr("id");
var string = 'id='+ id ;
$.ajax({
url: "<?php echo site_url('gallery/delete_image') ?>",
type: "POST",
data: string,
cache: false,
success: function(){
commentContainer.slideUp('slow', function() {$(this).remove();});
$('#load').fadeOut();
}
});
return false;
});
});
此功能用于删除图像。 我如何结合这两个功能?首先,我想问问题,如果单击是继续删除。
当有人说我爱“舒尔”:d – genesis
'$(文件)。就绪(函数(){'和'$(函数(){'实际上是一回事 – Blazemonger
@genesis:!我爱fainthful Linux的家伙')' –