2016-08-23 64 views
3

我在這裏新的, 有人可以幫我修復這個無限的滾動div不工作在laravel 5嗎? 我已經參觀了很多鏈接,解決這個問題,但沒有幫助..Laravel 5 infinity滾動div

這是我的javascript

$(document).ready(function() { 
    var loading_options = { 
     finishedMsg: "<div class='end-msg'>Congratulations! You've reached the end of the internet</div>", 
     msgText: "<div class='center'>Loading news items...</div>", 
     img: "/js/ajax-loader.gif" 
    }; 

    $('#content').infinitescroll({ 
     loading: loading_options, 
     navSelector: "ul.pagination", 
     nextSelector: "ul.navigation a:first", 
     itemSelector: "#content div.cat-item" 
    }); 
}); 

,這是對我的刀片

<div class="col-sm-8 single-left" id="content"> 
    @foreach ($all as $image) 
    <div class="song" > 
     <div class="song-info"> 
      <h3>{{$image->judul}}</h3> 
     </div> 
     <div class="singleimage" > 
      <img src="/file/meme/{{ $image->gambar }}" alt="" /> 
     </div> 
    </div> 

    <div class="song-grid-right"> 
     <div class="share"> 
      <h5><div class="fb-share-button" data-href="https://developers.facebook.com/docs/plugins/" data-layout="button" data-size="large" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/wahyu.p.putra.10"></a></div></h5> 
      <ul> 
       <li><a href="/Meme/{{ $image->url }}/{{ $image->url2 }}" class="icon like">{{$image->likes}} Likes</a></li> 
       <li><a href="#" id="commenttombol" class="icon comment-icon">Comments</a></li> 
       <li class="view">{{$image->view}}</li> 
      </ul> 
     </div> 
    </div> 
    @endforeach 
</div> 

<div id="pagination"> 
    {!! $all->render()!!} 
</div> 

感謝:d

回答

0

保留此代碼

<div id="pagination"> 
    {!! $all->render()!!} 
</div> 

此DIV

<div class="col-sm-8 single-left" id="content"> 

希望它會工作。如果不是,請讓我知道