php - Laravel and Infinite Scroll not showing -


i'm having trouble implementing infinity scroll laravel site.

in google chrome dev log there no errors,

but doesn't work when go browse grid.

in displays standard laravel grid pagination links @ bottom

{{ html::script('assets/js/jquery.infinitescroll.js') }}  <script type="text/javascript"> $(function() {     $('#boxes').infinitescroll({     navselector     : ".paginate",     nextselector    : ".paginate a:last",     itemselector    : ".box",     debug           : false,     datatype        : 'html',     path: function(index) {         return "?page=" + index;     } }, function(newelements, data, url){      var $newelems = $( newelements );     $('#boxes').masonry( 'appended', $newelems, true);  }); }); </script> 

laravel blade

    <div id="boxes" class="browse-grid">             @if ( ! $data->isempty())             @foreach($data $k => $r)                    <figure class="col-sm-3 col-lg-2 col-xs-6" >                    <div class="img-container">                     </div>                         </figure>              @endforeach          @else             <div><h3 class="reviews-not-released"> {{ trans('main.no results') }}</h3></div>         @endif      </div>      {{ $data->appends(array())->links() }} 

i copied code laravel , infinite scroll

but infinity scroll doesn't launch me. pagination looks this.

 <div class="row pagination-top">      <ul class="pagination">             <li><a href="http://test123.com/agents?page=2">2</a></li><li><a href="http://test123.com/agents?page=3">3</a></li><li><a href="http://test123.com/agents?page=4">4</a></li><li><a href="http://test123.com/agents?page=5">5</a></li><li><a href="http://test123.com/agents?page=6">6</a></li><li><a href="http://test123.com/agents?page=7">7</a></li><li><a href="http://test123.com/agents?page=8">8</a></li><li><a href="http://test123.com/agents?page=9">9</a></li><li><a href="http://test123.com/agents?page=2">&raquo;</a></li> </ul> 

late answer wanted out if you're still looking solution or if else has problem this.

for me helped, changed

$('#boxes').infinitescroll({ 

to:

$('.pagination').infinitescroll({ 

though in end went jscroll instead of infinite scroll, found lots better myself. same change there (taken example in link provided):

$('.scroll').jscroll({  

to: $('.pagination').jscroll({

i spent 2 days figuring out , got work, hope helps in need!


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -