There are so many plugins which provides the functionality of loading content while scroll to the bottom but you can’t depend on the plugins because they are limited to some extent.
When to code for this kind of stuff
As plugins are limited to some extent but may be your requirement demands more than a plugin can provide the you need to code by your own.
What this code will do it will load content while scroll to the bottom for three times and then it will append a button to load all which will load rest of the content.
###Setting up div where the scrolling js would apply
I wrote a js file for scrolling to the bottom and loading content.
scroll_sheet.js
###controller
This is your controller’s action where you are fetching the sheets for each scroll.
This is the action where you need to load rest of the content.
If you need to made this js available throughout the application then you need to do this:
application.js
Now I am calling this function from the page where I need to load my content on scroll to the bottom.