The GIF file/AJAX spinner that i have is working fine on IE, Safari and Chrome. When i run the same code in Firefox, the spinner spins for sometime and becomes static/freezes until the next page is loaded. What am i missing here?
Here is the JS and CSS
.ajaxspinner {
display: none;
overflow: hidden;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1050;
-webkit-overflow-scrolling: touch;
outline: 0;
opacity: 0.8;
background-position: center;
background-repeat: no-repeat;
background-image: url('../ajaxspinner.gif');
}
function SendData(){
$('.ajaxspinner').show();
var message = "";
var sendDataTostudent= {
studentid: sID,
}
if (message.length == 0) {
$.ajax({
url: window.location.href,
type: "POST",
context: this,
data: sendDataTostudent
dataType: 'json',
success: function (data) {
window.location.href = data.Url;
},
error: function (data) {
$('.ajaxspinner').hide();
}
});
} else {
$('.ajaxspinner').hide();
}
};