I am trying to make ajax load for pagination using following code :
/*Ajax Pagination*/
$(function() {
$('body').on('click', '.pagination a', function(e) {
e.preventDefault();
$('#fundraisers #fundraiser_main').css('background', 'red');
$('#fundraisers').append('<img style="position: fixed; left: 30%; top: 20%; z-index: 100000;"
src="/images/loading.gif" />');
var url = $(this).attr('href');
getFundraisers(url);
window.history.pushState("", "", url);
});
function getFundraisers(url) {
$.ajax({
url : url
}).done(function (data) {
$('body').html(data);
// $('.c').countUp();
}).fail(function () {
alert('Could not be loaded.');
});
}
});
But after the ajax call, I am getting error for the following code I am using for my counter(number)(onscroll ) :
$(document).ready(function () {
$('.c').countUp();
});
The error I am getting from the console is :
It also yielding error for the owl carousel I am using to slide categories :

Even Bootstrap dropdown is not working after the call .
