• Register
  • Log In
  • Home
  • Quick Start
    • Configurator
    • Download YUI 3
  • Documentation
    • User Guides
    • Examples
    • Tutorials
    • API Docs
  • Community
    • Gallery
    • Blog »
    • Forums
    • YUI Theater
    • Calendar
  • Contribute
    • YUI on GitHub »
    • File a Ticket
    • View Tickets
    • Dashboard
  • Other Projects
    • YUI 2
    • YUI Compressor
    • YUI Doc »
    • YUI Builder
    • YUI PHP Loader
    • YUI Test
    • YUI Website
  • YUI
  • >
  • Community
  • >
  • Gallery

Gallery

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • FAQ
  • Developer FAQ
  • Developer Guide
  • Module Setup

Tag Cloud

widget css nzakas lsmith satyam caridy async ericf datatable liferay io greghinch form apipkin node davglass plugin event animation foxxtrot table solmsted yql jafl model

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/10/12
    + 1 -

    John Lindal

    YUI Contributor

    See 43 more by this user.

    Created: 01/27/10
    Last CDN Push: 7 hours ago
    Build Tag: gallery-2012.05.16-20-37
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.5.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.5.1/build/yui/yui-min.js"></script>
    YUI({
        //Last Gallery Build of this module
        gallery: 'gallery-2012.05.16-20-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

    Subject Author Date
    Using Paginator Port with DataTable Peter Peterson 11/15/11
    Re: Using Paginator Port with DataTable John Lindal 11/16/11
    Re: Using Paginator Port with DataTable Peter Peterson 11/16/11
    Re: Using Paginator Port with DataTable John Lindal 11/16/11

    © 2006-2011 Yahoo! Inc. All rights reserved.
    All code on this site is licensed under the BSD License unless stated otherwise.
    About This Site · Security Contact Info