Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here i solve this problem in my own way you can try this.In your script remove this line</p> <pre><code>'contentData': {page_num:$('.image-box').size()}, </code></pre> <p>and add this line</p> <pre><code> 'childClass' : '.image-box', </code></pre> <p>After open scrollpagination.js file then replace this line <code>data: opts.contentData,</code> with this <code>data: {page_num : $(obj).children(opts.childClass).size()},</code>. Again replace <code>'contentData' : {},</code> this line with <code>'childClass' : '.datalist',</code>.</p> <p>In your <code>function display_friends()</code> please replace <code>exit;</code> function with this line <code>echo '&lt;input type="hidden" id="nodata" value="1" /&gt;';</code> . After that write your script look like this : </p> <pre><code>$(function(){ $('#nomoreresult').hide(); $('#loading1').hide(); $('#friend_display').scrollPagination({ 'contentPage': 'Your_Url', // the url you are fetching the results // these are the variables you can pass to the request, for example: children().size() to know which page you are 'childClass' : '.image-box', 'scrollTarget': $(window), // who gonna scroll? in this example, the full window 'heightOffset': 10, // it gonna request when scroll is 10 pixels before the page ends 'beforeLoad': function(){ // before load function, you can display a preloader div $('#loading1').show().fadeIn(); }, 'afterLoad': function(elementsLoaded){ // after loading content, you can use this function to animate your new elements $('#loading1').hide().fadeOut(); $(elementsLoaded).fadeInWithDelay(); if($('#nodata').val() == '1'){ $('#friend_display').stopScrollPagination(); $('#loading1').hide(); $('#nomoreresult').show().fadeIn(); } } }); // code for fade in element by element $.fn.fadeInWithDelay = function(){ var delay = 0; return this.each(function(){ $(this).delay(delay).animate({opacity:1}, 200); delay += 1000; }); }; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload