最初の関数(http://nadiana.com/jquery-confirm-pluginで見つけることができる):2つの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;
});
});
この機能は、画像を削除するためです。 どうすればこの2つの機能を組み合わせることができますか?最初に私は質問をしたいと思って、はいが削除を続行するためにクリックされた場合。
を「SHURE」:D – genesis
'$(ドキュメント).ready – Blazemonger
@genesis:私はうまくいっているLinuxの男が好きです ';)' –