pagination bootstrap update layout
This commit is contained in:
10
app/assets/javascripts/pagination.js.coffee
Normal file
10
app/assets/javascripts/pagination.js.coffee
Normal file
@@ -0,0 +1,10 @@
|
||||
jQuery ->
|
||||
if $('#infinite-scrolling').size() > 0
|
||||
$(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
|
||||
Reference in New Issue
Block a user