I have been trying infinite scroll for my own website. It is working fine if i give same website url. But if i give the api.instagram.com instead, then it is not requesting jsonp request and the request is unsuccessful.
Please suggest me that how do i implement infinite scroll with jsonp request,
Below is my piece of code,
$('.thumbnails').infinitescroll({
navSelector : "a#next:last",
nextSelector : "a#next:last",
contentSelector : ".thumbnails",
itemSelector : ".thumbnails",
dataType: 'json'
});
navSelctor is <a id="next" href="https://api.instagram.com/v1/tags/tamil/media/recent?callback=jQuery18304228946652839459_1357811552825&client_id=f34d9190c452476d931b813c7bc5e368&max_tag_id=1357828120918&access_token=73b038d4a22848c295dc813b37720ada&_=1357811765921">more</a>
Below is Content Selector
<ul class="thumbnails">
<div style="text-align:center;display:none;" id="no_photo"> No photos found! </div>
</ul>
Thanks.
Assuming you’re using Paul Irish’s Infinite Scroll plugin, it supports loading JSON data (using
$.ajax()withdataType: 'json') but not JSONP. You’ll need to patch it to support JSONP (which may not be too difficult) or use a different plugin.