I have one question about loading animation.
How can i add my CSS loading animation in my ajax like before open page anyone can help me in this regard ?
HTML
<div id="loader"></div>
AJAX
$(".cabi").click(function(){
$(this).css('left',($(window).width()-$(this).outerWidth())/ 2 + 'px');
$(this).css('top',($(window).height()-$(this).outerHeight())/ 2 + 'px');
$('body').css('overflow', 'hidden');
event.preventDefault();
var id = $(this).data("id");
$.ajax({
url: "info.php?info_id="+id,
type: 'get',
}).done(function(data) {
$(".sidebar").fadeIn().find(".sidebar-content").animate({"right":0}, 200).html(data);
imgResize(jQuery,'smartresize');
});
});
$(".sidebar").click(function(){
$(".sidebar-content").animate({"right":"-565px"},200,function(){
$(".sidebar").fadeOut();
$('body').css('overflow', 'auto'); //ADD THIS
})
});
$(".sidebar-content").click(function(e){
e.stopPropagation();
});