Saturday, August 23, 2014

How to apply Loader Image in C#

Add this div in your page:
<div id="loading" style="display:none;">
 <img id="loading-image" src="images/ajax-loader.gif" alt="Loading..." />
</div>
Add this Style in your page:
<style>
#loading {
 width: 100%;
 height: 100%;
 top: 0px;
 left: 0px;
 position: fixed;
 display: block;
 opacity: 0.7;
 background-color: #fff;
 z-index: 99;
 text-align: center;
}

#loading-image {
 position: absolute;
 top: 100px;
 left: 240px;
 z-index: 100;
}
</style>


Add this line where you want to show loading image div & hide:
$('#loading').show();

$('#loading').hide();

No comments:

Post a Comment