<button id="load">Load It!</button>
<div class="modal js-loading-bar">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<div class="progress progress-popup">
<div class="progress-bar"></div>
</div>
</div>
</div>
</div>
</div>
.progress-bar.animate {
width: 100%;
}
// Setup
this.$('.js-loading-bar').modal({
backdrop: 'static',
show: false
});
$('#load').click(function() {
var $modal = $('.js-loading-bar'),
$bar = $modal.find('.progress-bar');
$modal.modal('show');
$bar.addClass('animate');
setTimeout(function() {
$bar.removeClass('animate');
$modal.modal('hide');
}, 1500);
});