adding loading on load to a modal only code example
Example: add loader inside the modal
############### CSS ##################
#loading {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 9999;
background: url(img/preloader.gif) center no-repeat #fff;
}
############### HTML ###################
<div id="loading"></div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
aria-labelledby="myModalLabel"></div>