title: Hide alert when click on close button instead remove it
body: <p>In my page, the response from server is displayed using this alert:</p>
  
  <pre><code>    &lt;div id="yes" class="alert alert-success" role="alert" style="display: none;"&gt;
        &lt;button type="button" class="close" data-dismiss="alert"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;span class="sr-only"&gt;Close&lt;/span&gt;&lt;/button&gt;
        &lt;strong&gt;Pronto!&lt;/strong&gt; cadastro efetuado com sucesso! 
      &lt;/div&gt;
  </code></pre>
  
  <p>Is there any way to when I click in the close button from the alert, it be hide instead removed from page? I try this (following instructions from <a href="http://getbootstrap.com/javascript/#alerts" rel="noreferrer">here</a>), without success:</p>
  
  <pre><code>$('#my-alert').on('close.bs.alert', function () {
    $(this).hide();
  })
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I also try this:</p>
  
  <pre><code>    $('button.close').on("click", function(){
          $(this).parent().hide();
      });
  </code></pre>
  
  <p>but still the same problem, when I click in the close button, the alert is removed.</p>