YUILibrary - Open source JavaScript and CSS for building richly interactive software.
Fork YUI on GitHub
  • Home
  • Gallery
  • Forums
  • YUI 2
  • YUI 3
  • YUI Compressor
  • YUI Doc
  • More
  • Gallery Forums
  • Gallery Stats
  • Gallery Calendar
  • Register
  • Login

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • FAQ
  • Developer FAQ
  • Developer Guide
  • Module Setup

Tag Cloud

event jafl slideshow apipkin overlay davglass foxxtrot io jsonp animation adam port caridy node html5 rgrove yui2 skinnable widget ericf form filter ajax lsmith nzakas plugin

Context Navigation

    YUI Library is not responsible for bugs or support with this module. It is available as a free service. For support please contact the module owner with the provided links.

    Paginator Port (gallery-paginator) on cdn

    Last Updated: 05/25/10
    + 0 -

    John Lindal

    YUI Contributor

    See 11 more by this user.

    Created: 01/27/10
    Last CDN Push: 06/23/10
    Build Tag: gallery-2010.06.23-18-37
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.1.1
    Free for use.

    This is an unofficial port of YUI2 Paginator.

    • Tags:
    • pagination
    • paginator
    • jafl
    • Download
    • Docs
    • Homepage
    • Bugs
    • Source
    • Example
    • Forum
    • History

    The code sample instantiates two paginators. The first one uses the defaults. The second one specifies a custom template and custom appearance for some of the components in the template.

    Code Sample

    <script src="http://yui.yahooapis.com/3.1.0/build/yui/yui-min.js"></script>
    YUI({
        //Last Gallery Build of this module
        gallery: 'gallery-2010.06.23-18-37'
    }).use('gallery-paginator', function(Y)
    {
    	function update(
    		/* object */	state)
    	{
    		this.setPage(state.page, true);
    		this.setRowsPerPage(state.rowsPerPage, true);
    	}
     
    	var p1 = new Y.Paginator(
    	{
    		totalRecords: 25,
    		rowsPerPage:5
    	});
    	p1.on('changeRequest', update, p);
    	p1.render('#pg1');
     
    	var p2 = new Y.Paginator(
    	{
    		totalRecords: 25,
    		rowsPerPage:5,
    		template: '{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {ItemRangeDropdown} {NextPageLink} {LastPageLink}',
    		firstPageLinkLabel:    '|<',
    		previousPageLinkLabel: '<',
    		nextPageLinkLabel:     '>',
    		lastPageLinkLabel:     '>|'
    	});
    	p2.on('changeRequest', update, p);
    	p2.render('#pg2');
     
    });

    Forum Posts

    No forum posts for this module.

    YUI Projects
    • All YUI Downloads
    • YUI 2
    • YUI 3
    • YUI Doc
    • YUI Compressor
    • YUILibrary.com
    • YUI Build Tool
    • YUI PHP Loader
    Pages & Links
    • All YUI Downloads
    • Git FAQ
    • Graded Browser Support
    • Contribute to YUI
    • Forum Stats
    • Gallery Stats
    • YUI Calendar
    Contribute
    • Submit a Bug
    • Request a Feature
    • Write Code
    • Meet the Team
    Follow YUI
    • on GitHub
    • on Twitter
    • on FriendFeed
    • on Facebook
    • on IRC
    • YUI Blog
    • YUI Theater
    • YUI Forums

    © 2010 YUI Library - Site Credits