Saturday, November 3, 2012

delete record using ajax and php

delete record using ajax and php 

    <script type="text/javascript">
$(document).ready(function() {
$('#selector').delay(5000).fadeOut('slow');


  $('a.delete').click(function(e) {
 
    var delid = $(this).attr("href");
      //  alert(addressValue );
    e.preventDefault();
    var parent = $(this).parent();
    $.ajax({
      type: 'get',
      url: '<?php echo get_site_url(); ?>/jquery-record-delete1.php',
      data: 'ajax='+delid,
      beforeSend: function() {
        parent.animate({'backgroundColor':'#fb6c6c'},300);
      },
      success: function() {
        parent.slideUp(300,function() {
          parent.remove();
        });
      }
    });
  });
});
</script>
<a href="<?=$albumid?>" class="delete">Delete</a>

No comments:

Post a Comment

Thank you for your Comment....

Popular Posts