I load html content via ajax on click event. My code is
$.ajax({
url: somelink,
async: true,
beforeSend: function () {
$("#myDiv").fadeOut("slow");
$("#myDiv").empty();
},
success: function (data) {
$('#myDiv').html(data);
$("#myDiv").fadeIn("slow");
},
error: function (request, status, error) {
alert("Error");
},
complete: function () {
}
});
Problem: #myDiv freezes twice. What is the problem?
source
share