Guest User

Alertify ajax delete

a guest
Jan 26th, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(function() {
  2.  
  3.  
  4. $(".delbutton").click(function(){
  5.  
  6. var element = $(this);
  7.  
  8. var del_id = element.attr("id");
  9.  
  10. var info = 'id=' + del_id;
  11. alertify.confirm("Message", function (e) {
  12.     if (e) {
  13.  $.ajax({
  14.    type: "GET",
  15.    url: "members/delete.php",
  16.    data: info,
  17.    success: function(){
  18.    
  19.    }
  20.  });
  21.          $(this).parents(".record").animate({ backgroundColor: "#fbc7c7" }, "fast")
  22.         .animate({ opacity: "hide" }, "slow");
  23.  
  24.  
  25.     }
  26.    
  27.     else {
  28.     }
  29. });
  30.  
  31.  
  32. return false;
  33.  
  34. });
  35.  
  36. });
Advertisement
Add Comment
Please, Sign In to add comment