title: Getting element Id Sweet Alert
body: <p>I'm trying to use <a href="http://t4t5.github.io/sweetalert/" rel="nofollow">sweet alert</a> as a dialog to confirm the deletion of an entry on a table. 
  There's a column on each table row which has a button which opens a 'Sweet Alert' confirm dialog. </p>
  
  <p>The code of my table is as follow:</p>
  
  <pre><code>&lt;tr&gt;
      &lt;!-- Other Table Colums --&gt;
      &lt;td&gt;
      &lt;button userid="&lt;?php echo $row['id']; ?&gt;" id="&lt;?php echo('bn_delete_' . $row['id']); ?&gt;" class="btn btn-danger btn-xs warning-message-parameter"&gt;Delete&lt;/button&gt;
      &lt;td&gt;
   &lt;/tr&gt;
  </code></pre>
  
  <p>The code for my sweet alert dialog is: </p>
  
  <pre><code>swal({   title: "Are you sure?",   
           text: "You will not be able to recover this imaginary file!", 
           type: "warning",   showCancelButton: true,   confirmButtonColor: "#DD6B55",   
           confirmButtonText: "Yes, delete it!",   
           closeOnConfirm: false }, 
           function(){   
                 swal("Deleted!", "Your imaginary file has been deleted.", "success"); });
  </code></pre>
  
  <p>When the user clicks yes on the dialog, I want to get the id of the button which the user just clicked. That way I'll be able to get the value of the attribute userid which I can then use to delete the entry from database. </p>