Auto Hide Alert Box using Bootstrap and Jquery

 Today we are going to see how to create auto hide alert box. This type of auto alert box is useful when you display message on any of the user activities. This is user friedly it automatically close the alert box based on the time you set. It also contain the close icon to manually close the alertbox by clicking close button.

 This alert box responsive one because we are using bootstrap framework. This auto close alert box created by using bootstrap and jquery. Here is the demo page you can see the live demo by click demo button below. You can download the code and use it. I hope this is very simple and very useful to you.

Auto Hide Alert box using Bootstrap:

<!DOCTYPE html>
<title> Auto Hide Alert box using Bootstrap</title>
margin:0 auto;

    background-color: #009688 !important;
    color: #fff !important;
    width: 161px;
    margin: 0 auto;
    display: block !important;
    <link rel="stylesheet" href="" />

<div class="product-options">
  <a id="myWish" href="javascript:;" class=" san-button btn btn-mini">Click for Alert box </a>
<div class="alert alert-success" id="success-alert">
  <button type="button" class="close" data-dismiss="alert">x</button>
  <strong>Success! </strong> Product have added to your wishlist.

<script src=""></script>
    <script type="text/javascript">
        $(document).ready(function() {
  $("#myWish").click(function showAlert() {
    $("#success-alert").fadeTo(2000, 500).slideUp(500, function() {

Post a Comment