AJAX loader with an image

AJAX loader with an image

Add:


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

Remove:


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

[cc lang=”css” escaped=”true” width=”100%” theme=”default” line_numbers=”on” lines=”-1″]
#ajaxloader img {
-webkit-animation:spin 1s linear infinite;
-moz-animation:spin 1s linear infinite;
animation:spin 1s linear infinite;
}
@-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } }
@-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } }
@keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }
#ajaxloader {
display: none;
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
background: rgba(255, 255, 255, 0.7);
z-index: 1;
text-align: center;
}