Created
August 23, 2013 04:02
-
-
Save songjiayang/6315426 to your computer and use it in GitHub Desktop.
a plugin for infinitescroll with kaminari to auto scroll load page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//= require jquery | |
//= require gigabase | |
$ -> | |
$('.infinitescroll_wrapper').each -> | |
$wrapper = $(this) | |
$wrapper.find('.feed-paging nav.pagination').hide() | |
$wrapper.infinitescroll | |
navSelector: "nav.pagination" | |
nextSelector: "nav.pagination .next a" | |
itemSelector: ".infinitescroll_item" | |
bufferPx: 150 | |
loading: | |
img: "/assets/spinner.gif" | |
msgText: "<em>#{__("Loading...")}</em>" | |
finishedMsg: "<em>#{__("No more pages...")}</em>" | |
(elements) -> | |
$wrapper.append($(elements)) | |
true | |
true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment