I'm using jQuery Infinite scroll plugin for pagination. The pagination URL is dynamic as it is returned from API. This code works till sending the Ajax request.
$('#stream').infinitescroll({
navSelector : ".paginate:last",
nextSelector : "a.paginate:last",
dataType : 'json',
appendCallback : false,
path: function(path,page){
return $("a.paginate:last").attr("href");
}
}, function(json, opts){
});
But I have to set request header in the Ajax call for authentication in the server side.
How to pass request headers with the url.
Thanks,
Srikanth