I am setting up a j query mobile page showing over 50 elements, how can I just show the first 10 when open up the page, and with a more button on the bottom which can show all if click on it. my script is:
My lazyloader plugin is more for automatically loading more items when the user is scrolling down and gets close to the bottom of the list. On the github page, there is an example of how to manually kickoff the "loadMore" function, so that could work for you if put into the click handler of the "More..." button if it's at the bottom of the listview (similar to how the example puts the call to the "loadMore" function in the scrollDown function).
As @watusiware mentioned, you will still have to develop the backend piece in the ROR framework which will return JSON (or HTML) for the next 10 list items (or 40 if you want to do it that way). I recommend using pre-compiled Dust templates and JSON from the server side. But, the lazyloader plugin supports several different JS templating engines as well as plain HTML. It's a worthwhile exercise to try it both ways.