Lazy-loading pages of content with Ojay.AjaxPaginator

Here we show how to turn a set of links to other pages into a scrollable interface that displays the linked content in the current document. With JavaScript disabled, users can follow the links to the content, but with JavaScript enabled they get an enhanced experience. Content is not loaded into the page until the user has clicked the appropriate link. Ojay.History is used to track the paginator so that the linked content is still bookmarkable in the JavaScript-enhanced version of the page.

JavaScript source code

Stylesheet