Bootstrap - Growl Create Bootstrap alert with jQuery
by bizamajig
HTML
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css">
<button id="myBtn">Click Here</button>
<!-- Post Info -->
<div style='position:fixed;bottom:0;left:0;
background:lightgray;width:100%;'>
About this SO Question:
<a href='http://stackoverflow.com/q/19867533/1366033'>
Create Bootstrap alert in JQuery
</a><br/>
<div>
JavaScript
$("#myBtn").click(function() {
$(this).after(
'<div class="alert alert-success alert-dismissable">'+
'<button type="button" class="close" ' +
'data-dismiss="alert" aria-hidden="true">' +
'×' +
'</button>' +
'Password Changed' +
'</div>');
});