title: How to remove focus from button after closing javascript confirm box
body: <p>I have a button with a bootstrap element on it.</p>
  
  <pre><code>&lt;button title="delete" type="button"  class="btn btn-default btn-sr"  data-confirm="Are you sure to delete this item?"&gt;&lt;span class="glyphicon glyphicon-trash white"&gt;&lt;/span&gt;&lt;/button&gt;&lt;/a&gt;';
  </code></pre>
  
  <p>It has a css property which I color it red.</p>
  
  <p>When user clicks the delete button, a JavaScript confirmation will come out.</p>
  
  <p>The problem is whenever i click cancel, the button will be focused. How do I remove the focused button?</p>
  
  <p>Here is the jQuery code:</p>
  
  <pre><code>&lt;script&gt;
      $(document).on('click', ':not(form)[data-confirm]', function(e) {
          if( !confirm($(this).data('confirm')) ) {
              e.stopImmediatePropagation();
              e.preventDefault();
          }
      });
  &lt;/script&gt;
  </code></pre>