Quantcast
Channel: Active questions tagged instafeedjs+jquery+javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 32

load more button in instafeed js issue

$
0
0

The load more btn works fine, but when i click load more, images are showing up but the problem is its shows from the top, it doesn't show where i was. it should show from 13 and the rest , not from img 1 and the rest.

HTML

   <a class="btn" href="#">load more</a>

Javascript

   function instafeed() {
   var myButton = $('#load-more');
   var brave = new Instafeed({
   target: 'brave',
   get: 'user',
   userId: XXXX,
   accessToken: 'XXXX',
   limit: 12,
   resolution: 'low_resolution',
   template: '<div class="insta-wrap grid"><img src="{{image}}" /><a class="grid-link" href="{{link}}"  target="_blank"><div class="likes-wrap"><div class="likes">&hearts; {{likes}}</div></div></a></div>',
   after: function() {
    if (!this.hasNext()) {
        myButton.hide();
    }
  }
});

Viewing all articles
Browse latest Browse all 32

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>