Giter Site home page Giter Site logo

jquery.pageless's Introduction

PageLess - endless page

Description

Pageless is a jQuery plugin. As you scroll down you see more results coming back at you automatically. It provides an automatic pagination in an accessible way : if javascript is disabled your standard pagination is supposed to work.

Parameters

  • currentPage: current page (params[:page])
  • distance: distance to the end of page in px when ajax query is fired
  • loader: selector of the loader div (ajax activity indicator)
  • loaderHtml: html code of the div if loader not used
  • loaderImage: image inside the loader
  • loaderMsg: displayed ajax message
  • pagination: selector of the paginator divs. (if javascript is disabled paginator is required)
  • params: paramaters for the ajax query, you can pass auth_token here
  • totalPages: total number of pages
  • url: URL used to request more data
  • method: HTML method for call URL, default - get
  • scrape: A function to modify the incoming data. (Doesn't do anything by default)
  • complete: A function to call when a new page has been loaded (optional)
  • end: A function to call when the last page has been loaded (optional)

Requirements

Then just navigate to http://localhost:3000 and enjoy!

Demo (Rails 3)

Demo is a Rails 3 app that just runs. It demonstrates the basic usage of pageless scrolling.

$ bundle install
$ rails s

Then just navigate to http://localhost:3000 and enjoy!

Usage

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

Thanks to

Contributors

jquery.pageless's People

Contributors

aegorov avatar binarykitten avatar bonds avatar dennysfredericci avatar jney avatar nagybence avatar nevernormal1 avatar optiminimalist avatar overbryd avatar richardiux avatar zubin avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.