Open Pandahisham opened 8 years ago
it's Infinite Scroll . it's using laravel’s pagination functionality.
public function getNewsPage(){
$news = News::all()->paginate(10);
return View::make('news', compact('news));
}
<div id="abs">
<ul id="items">
@foreach($news as $new)
<li class="item">
<a href="" target="_blank">{{ $new->title }}</a>
</li>
@endforeach
</ul>
@ajaxpagination($news)
</div>
you can visit www.respostat.com to show how work.
thanks for clearing it :+1: , btw your demo page css needs some fixing i guess , while ajaxing the the views it adda a vertical scrollbar temporarily . also i think the plugin should be decoupled from jquery.
i cant fix it if you know how can fix it please sent me
Is there a way to put a script that initializes jscroll to the bottom of the page, before
? I have all of my scripts at the bottom of the page and, I get error "Uncaught ReferenceError: $ is not defined",
It's difficult to understand , what it is trying to ajax ? is it fetching values from DB or fetching views/ partials . Sorry but i am not a native English speaker