<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container">
<div class="row">
<h2>"Waiting for..." modal dialog with progress bar</h2>
<p>If you need to block a user screen while loading some data or doing heavy computations,
you can use this snippet to show modal dialog with progress bar.</p>
<p>Fork it on <a href="https://github.com/ehpc/bootstrap-waitingfor">github</a></p>
<h2>Examples <small>All dialogs will be automatically closed after 2 seconds</small></h2>
<h3>Simple dialog</h3>
<pre>
waitingDialog.show();</pre>
<button type="button" class="btn btn-primary" onclick="waitingDialog.show();setTimeout(function () {waitingDialog.hide();}, 3000);">Show dialog</button>
<h3>Dialog with custom message</h3>
<pre>
waitingDialog.show('Custom message');</pre>
<button type="button" class="btn btn-success" onclick="waitingDialog.show('Custom message');setTimeout(function () {waitingDialog.hide();}, 2000);">Show dialog</button>
<h3>Dialog with custom settings</h3>
<pre>
waitingDialog.show('Custom message', {dialogSize: 'sm', progressType: 'warning'});</pre>
<button type="button" class="btn btn-warning" onclick="waitingDialog.show('Custom message', {dialogSize: 'sm', progressType: 'warning'});setTimeout(function () {waitingDialog.hide();}, 2000);">Show dialog</button>
<p> </p>
</div>
</div>