title: Jquery Confirm and CodeIgniter Delete
body: <p>I'm working with this admin panel template confirm box.</p>
  
  <p><a href="http://themepixels.com/main/themes/demo/webpage/shamcey/elements.html" rel="nofollow">http://themepixels.com/main/themes/demo/webpage/shamcey/elements.html</a></p>
  
  <p>When i click confirm box's ok button ajax part wont work.</p>
  
  <p>I dont understand why it isnt working?</p>
  
  <p>Here my code:</p>
  
  <p>//Jquery Part  </p>
  
  <pre><code>&lt;script&gt;
  jQuery(document).ready(function(){
  if(jQuery('.confirmbutton').length &gt; 0) {
      jQuery('.confirmbutton').click(function(){
          jConfirm('Can you confirm this?', 'Confirmation Dialog', function(r) {
               if(r==true){
                  var article_id=$(this).attr("id");
                   $.ajax({
                      type:"POST",
                      url: "&lt;?php echo site_url()?&gt;admin/delete",data: "id="+article_id+"&amp;categ=article",asynchronous: true,cashe: false,beforeSend: function(){},
                      success: function(){
                      $('#delete_link_'+article_id).hide();
                      }
                      }); 
               }
          });
      });
  }
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>//HTML</p>
  
  <pre><code>&lt;tr id="delete_link_15"&gt;
  &lt;td&gt;15&lt;/td&gt;
  &lt;td&gt;1&lt;/td&gt;
  &lt;td&gt;asg&lt;/td&gt;
  &lt;td&gt;etc&lt;/td&gt;
  &lt;td&gt;etc&lt;/td&gt;
  &lt;td&gt;
  &lt;span class="btn-group"&gt;
  &lt;a class="btn btn-small confirmbutton"&gt;&lt;i class="icon-trash"&gt;&lt;/i&gt;&lt;/a&gt;
  &lt;/span&gt;
  &lt;/td&gt;
  &lt;/tr&gt;        
  </code></pre>