New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

basic-pagination

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basic-pagination

A simple, self-contained, modular controller for managing paginated links.

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source

Pagination: Nothin' fancy

A simple, self-contained, modular controller for managing paginated links. Perfect complement to any AJAX-powered component that displays results in sets.

# Quick install with package managers:
bower install basic-pagination
npm install basic-pagination

Usage

let pager = new Pagination(el, {
	
	/** Zero-based index of initially-selected link */
	active: 2,
	
	/** Callback triggered when a link is pressed by user */
	onChange: function(newIndex, oldIndex){
		console.log(`Current page is now ${newIndex}`);
	},
	
	linkTemplate: '<li><a href="#">Custom element, you say?</a></li>'
});

/** Programmatically set selected link */
pager.active = 10;

Full option documentation can be found here.

License

Oh, I am so not fussed. This is released under the ISC license, which is basically just a simplified version of the MIT license.

Author attribution is nice, but I won't sledge your car door in for not putting my name in your work. Really. Credit me, thank me, send me a fruit basket, set my face as your desktop (I recommend this) ... all are nice, but none are mandatory.

Keywords

pagination

FAQs

Package last updated on 20 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts