Created
March 21, 2013 19:00
-
-
Save vadimdemedes/5215688 to your computer and use it in GitHub Desktop.
Infinite scroll
This file contains 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
var scroll = Chute.View.Plugins.InfiniteScroll.extend({ | |
container: 'div.assets' | |
}); | |
var AssetCollectionView = Chute.CollectionView.extend({ | |
... | |
plugins: [scroll] | |
... | |
}); | |
var view = new AssetCollectionView({ ... }); | |
view.on('data:page', function(){ | |
// page automatically incremented and new data loaded | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment