Works with will_paginate. Requires innerShiv http://jdbartlett.github.com/innershiv/
✓ Published0🌍 Public
DDylanFM
Last edited Feb 28, 2011
Created on Feb 28, 2011
This example shows a jQuery plugin that transforms a standard paginated list into a “load more” button, fetching additional items via AJAX and appending them to the existing list. It uses `$.fn.extend` to define the `paginate` method, `$.get` for requests, and `innerShiv` to parse and insert the returned HTML. The plugin replaces the `.pagination` element with a custom link, updates the page parameter in the URL, and hides itself when fewer items than the configured `num` are returned. It relies on server-side partials formatted as `format: 'partial'` and assumes the list contains `li` elements.
AI-generated description