0
Я использую этот класс для установки предупреждения «Да/Нет».jquery подтвердить действие не работает
http://myclabs.github.io/jquery.confirm/
Это мой код:
var currentId;
$(".confirm").click(function() {
currentId = $(this).attr('id');
});
$(".confirm").confirm({
text: "Are you sure?",
confirm: function(button) {
//if I alert here currentId, it alerts right
$.post("receive.php", { currentId: "id"})
.done(function(data) {
alert(data); //NOTHING!!!
});
},
cancel: function(button) {
$('.modal hide fade').css("display", "none");
},
confirmButton: "Yes",
cancelButton: "No!",
post: true
});
});
receive.php
<? echo $_POST['id']; ?>
В чем вопрос? –
У вас есть слишком много '});' s –