Level 50
Here is my implementation of the same jscroll:
@if(\Agent::isMobile())
<div class="infinite-scroll">
@include('partials.classifieds')
@include('partials.bottom_banner')
{{ $classifieds->appends(Request::except('page'))->links() }}
</div>
@else
@include('partials.classifieds')
@include('partials.bottom_banner')
{{ $classifieds->appends(Request::except('page'))->links() }}
@endif
and then:
@if(\Agent::isMobile())
<script type="text/javascript">
$('ul.list-inline').hide();
$(function() {
$('.infinite-scroll').jscroll({
autoTrigger: true,
loadingHtml: '<img class="center-block" src="/img/loading.gif" height="100" width="100" alt="Loading..." />',
padding: 0,
nextSelector: '.list-inline li.current-page + li a',
contentSelector: 'div.infinite-scroll',
callback: function() {
$('ul.list-inline').remove();
createNewBanner({{$classifieds->currentPage()}});
}
});
});
</script>
@endif
you basically need to figure out exactly what doom element to lock on to, in my case it is
<div class="infinite-scroll">
I actually display new google ads banner with each new scroll ;-)
Hope it helps!