Raghuveer
Raghuveer

Reputation: 397

Infinite scrolling in Rails application

I'm using the pageless plugin for my infinte scrolling.

In the usage he has mention as:

$('#results').pageless({ 
    totalPages: 10,
    url: '/articles/',
    loaderMsg: 'Loading more results'
});

What should I write in place of "#results"? I'm new to rails so I'm a bit confused.

Upvotes: 2

Views: 131

Answers (2)

Josh
Josh

Reputation: 21

Give the id of the element inside which your first page is loaded. Pagination will do the magic and append the rest of your contents to the same div

Upvotes: 1

agastalver
agastalver

Reputation: 1056

That's ok.

You only have to place a div in your html with the id results

<div id=results></div>

The plugin will do the rest.

Upvotes: 0

Related Questions