title: Fade out multiple Bootstrap alerts
body: <p>I came across a question asking how to fade out Bootstrap alerts after 5 seconds, and the answer was the following code. The issue is, it only works once, however as I have multiple alerts that are generated after an AJAX call this is no good. How do I make the following code run every time an alert is triggered?</p>
  
  <pre><code>window.setTimeout(function() {
       $(".alert").fadeTo(500, 0).slideUp(500, function(){
            $(this).remove(); 
       });
  }, 5000);
  </code></pre>