Timed Modal

On pages that are desciprtions of other pages or sections it make no sense to have a button that just renders the same page. The solution is to remove the button (probably a menu item) or to display a modal dialog. An alert() is a solution but I would prefer it to be a timed modal.

The jsfiddle example

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> 

<!-- jQuery library -->


<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js">

<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" id="modal" data-toggle="modal">
  Launch demo modal
</button>

The linked stylesheet, JavaScript and jQuery (above)need work for use on this website.............

The Modal and the JavaScript:

<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Modal title/h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">×</span>
        </button>
      </div>
      <div class="modal-body">
        ...
      </div>
    </div>
  </div>
</div>

<<script>
$(document).ready(function(){
  $('#modal').click(function(){
    $('#exampleModal').modal('show');
     setTimeout(function() {$('#exampleModal').modal('hide');}, 
      2000);
    }); 
  });
 </script> 

Links

External Sources

Timed Modal