I am using flex slider on a page and page also making an ajax call for other job. My issue is when user load the page, ajax call block flex slider until ajax request has not been completed. After completed ajax request, flex slider loaded successfully. If i remove ajax script then flex slider is loading very fast.
Flex slider and ajax request both are written between this code...
$(document).ready(function(){
$('#carousel').flexslider({
animation: "slide",
controlNav: true,
animationLoop: true,
slideshow: false,
itemWidth: 100,
itemMargin: 15,
asNavFor: '#slider'
});
// Rest code of slider will come here
// Ajax code start from here
$.ajax({
type: "GET",
async:false,
url: prefixUrl,
success: function(results) {
$(results).insertBefore('.event_container');
}
});
});
Please suggest any ideas so that ajax call should not block flex slider.
Thank you