title: Am i passing the value correctly to my controller from jquery?
body: <p>I am doing a delete on a table using jquery,</p>
  
  <pre><code>$('table#chkbox td a.delete').click(function()
      {
          if (confirm("Are you sure you want to delete this row?"))
          {
              var id = $(this).parent().attr('id');
  
              var parent = $(this).parent().parent();
  
              $.ajax(
              {
                     type: "POST",
                     url: "&lt;?php echo base_url().'index.php/libraryController/librarydelete' ?&gt;",
                     data: { 'id': id },
                     cache: false,
  
                     success: function()
                     {
                          parent.fadeOut('slow', function() {$(this).remove();});
                     }
               });                
          }
      });
  </code></pre>
  
  <p>I am getting the id value correctly but my data parameter doesn't get passed to my controller,</p>
  
  <pre><code>function librarydelete($id)
  {
  $del = $id;
  echo $del; 
  $this-&gt;librarymodel-&gt;deletebook_issue($id);
  $this-&gt;session-&gt;set_flashdata('response','Deleted successfully');
  redirect('libraryController/loadmagazinedetails');
  }
  </code></pre>
  
  <p>Any suggestion...</p>
  
  <p>I am getting the error,</p>
  
  <p><code>Missing argument 1 for libraryController::librarydelete()</code> and <code>Undefined variable: id</code></p>