Pagination fix

This commit is contained in:
Andreas Stephanides
2014-09-13 18:14:27 +02:00
parent 0658a8b423
commit 7a7128aa32
5 changed files with 13 additions and 8 deletions

View File

@@ -1,10 +1,16 @@
jQuery ->
$ ->
if $('#infinite-scrolling').size() > 0
more_posts_url = $('.pagination .next_page a').attr('href')
b=$(document).height() - $(window).height() - 60
if more_posts_url && $(window).scrollTop() > b
$('.pagination').html('<b> Loading...</b>')
$.getScript more_posts_url
$(window).on 'scroll', ->
more_posts_url = $('.pagination .next_page a').attr('href')
b=$(document).height() - $(window).height() - 60
if more_posts_url && $(window).scrollTop() > b
$('.pagination').html('<b> Loading...</b>')
$.getScript more_posts_url
return
return
return