2

currently I'm trying to use infinite ajax scroll function with my posts.

Here I want to make a link to load previous items like implemented on infinite ajax scroll history example here: http://infiniteajaxscroll.com/examples/history/page3.html (see Load more items above the content.)

My code:

Javascript:

<script type="text/javascript">
    var ias = jQuery.ias({
        container: '#posts',
        item: '.post',
        pagination: '#pagination',
        next: '.next'
    });

    ias.extension(new IASSpinnerExtension({src: 'ajax-loader.gif'}));
    ias.extension(new IASTriggerExtension({offset: 2}));
    ias.extension(new IASPagingExtension());
    ias.extension(new IASHistoryExtension({prev: '.prev a'}));
</script>

HTML Markup

<div id="posts">
    <div class="post">...</div>
    <div class="post">...</div>
</div>

<div id="pagination">
    <a href="/page2/" class="next">next</a>
</div>

I have tried with jQuery.ias().prev(); method but they have no clear documentation to impelement this.
Does someone know what wrong with my code? Thank you!

JrrMaster
  • 65
  • 1
  • 7
  • There currently is an issue with the prev method, see https://github.com/webcreate/infinite-ajax-scroll/issues/134. The TriggerExtension is preventing the method from working. – Fieg Jun 09 '14 at 11:11
  • Do you have a step by step documentation? – JrrMaster Jun 10 '14 at 03:17

0 Answers0