
$(document).ready(function(){
    
    
    $(".deactivate").click(function(e) {
        
        var id= $(this).attr("id");
        var url="vendor-action.php";
       
       $.ajax({
             type: "POST",
             url: url,
             data:{'id':id,'action':'Deactivate'}, // serializes form input
             success: function(data){
       alert(data);
                 location.reload();
             
             }
         });
       
       });
       
       $(".activate").click(function(e) {
      
       
       var id= $(this).attr("id");
       var url="vendor-action.php";
       
       
       $.ajax({
             type: "POST",
             url: url,
             data:{'id':id,'action':'Activate'}, // serializes form input
             success: function(data){
       alert(data);
                 location.reload();
             
             }
         });
       
       });
       
       
       
          $(".delete").click(function(e) {
       alert("gff");
       var id= $(this).attr("id");
       var url="vendor-action.php";
       
       
       $.ajax({
             type: "POST",
             url: url,
             data:{'id':id,'action':'Activate'}, // serializes form input
             success: function(data){
       alert(data);
                 location.reload();
             
             }
         });
       
       });
       
       
       
       
    
    
    $(".delete").click(function(e) {
alert("fdgd");
    var id= $(this).attr("id");
    var url="vendor-action.php";
   
     $.ajax({
            type: "POST",
            url: url,
            data:{'id':id,'action':'Delete'}, // serializes form input
            success: function(data){

                location.reload();
            
            }
        });

});

    
    
    
    
    
    
        
    });
     
    
    
    
    
    