title: Sweet Alert js on Codeigniter
body: <p>Anyone ever using sweet alert js? I have a question.</p>
  
  <p>this is my code to delete a post by id_event:</p>
  
  <pre><code> &lt;a href="&lt;?php echo base_url(); ?&gt;admin/event/delete_event/&lt;?php echo $row-&gt;id_event; ?&gt;" title="delete"&gt;&lt;i class="glyphicon glyphicon-trash" onClick="return(confirm('Are you sure?'));"&gt;&lt;/i&gt;&lt;/a&gt; 
  </code></pre>
  
  <p>i want to using sweet alert js for delete confirmation. this is the code :</p>
  
  <pre><code>swal({
    title: "Are you sure?",
    text: "Your will not be able to recover this post!",
    type: "warning",
    showCancelButton: true,
    confirmButtonColor: "#DD6B55",
    confirmButtonText: "Yes, delete it!",
    closeOnConfirm: false
  },
  function(){
    swal("Deleted!", "Your post has been deleted.", "success");
  });
  </code></pre>
  
  <p>i want to delete the post when i click the confirmButton.
  how do i implementation the code? thanks for helping :)</p>