GithubHelp home page GithubHelp logo

nicolaszhao / content-paginator Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 2.0 332 KB

A jquery plugin can paginate the large content. Increase the reading experience.

License: MIT License

JavaScript 93.45% CSS 6.55%

content-paginator's Introduction

Content Paginator

Content Paginator is a simple jQuery plugin that allows you to page the large text content. Makes limited page space to increase the content of the show, and improve content readability.

Current version: 0.2.0

Usage

Include jQuery and the plugin on your page. Then select a container contains a large text content and call the contentPaginator method on DOM ready.

<script src="jquery.js"></script>
<script src="jquery.content-paginator.js"></script>
<script>
	$(function() {
		$('#content-wrapper').contentPaginator();
	});
</script>
<div id="content-wrapper">
	<p></p>
	<p></p>
</div>

Settable Options

pageHeight (default: 300)
Type: Number
The height of content container.


duration (default: 800)
Type: Number
A number determining how long the paging fade animation will run.


prevText (default: "«Prev")
Type: String
The paging prev button text.


nextText (default: "Next»")
Type: String
The paging next button text.


numbersText (default: "{0}/{1}")
Type: String
The paging numbers section text. "{0}" instead of the pageindex, and "{1}" instead of the pagecount.

Theming

If paging button and paging numbers specific styling is needed, the following CSS class names can be used:

  • .content-paginator-nav: The outer container of the paging button and paging numbers.
    • .content-paginator-button: The container of the paging button.
      • .content-paginator-button-prev: Prev button link.
      • .content-paginator-button-next: Next button link.
      • .content-paginator-button-disabled: The paging button status of the first page or the last page.
    • .content-paginator-numbers: Paging numbers wrapper.

Dependencies

Required

jQuery, tested with 1.10.2

License

Copyright (c) 2013 Nicolas Zhao; Licensed MIT

content-paginator's People

Contributors

nicolaszhao avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

content-paginator's Issues

Using on Responsive layout

Hello!

Is it possible to use this in a responsive layout?
We need to set the pageHeight based on the screen width.

Thanks in advance,
Istvan

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.