jquery confirm action doesn't work -


i'm using class set yes/no alert.

http://myclabs.github.io/jquery.confirm/

this code:

var currentid;  $(".confirm").click(function() {     currentid = $(this).attr('id'); });  $(".confirm").confirm({     text: "are sure?",     confirm: function(button) {                     //if alert here currentid, 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']; ?> 

$.post("receive.php", { currentid: "id"} ) 

should be

$.post("receive.php", { id: currentid } ) 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -