npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jq-page

v1.0.7

Published

js分页插件

Downloads

12

Readme

paging

分页控件paging

例子见:http://tianxiangbing.github.io/paging/ 一个要仔细看例子的使用http://www.lovewebgames.com/jsmodule/paging.html

预览效果:

使用方法案例:(推荐使用这种方式)

<div id="pageTool"></div>
var p = new Paging();
p.init({target:'#pageTool',pagesize:10,count:100});
//重新渲染分页使用render
p.render({count:100,pagesize:10,current:3});

或者

var p = $('#pageTool').Paging({pagesize:10,count:100});
//返回的p是个数组,p[0]是第一个返回对象

npm安装方式

npm install jq-page

属性和方法

hash:false

是否用url hash值的形式来表达分页,默认为true,但如果出现两个分页时,为导致互相影响,应保证只有一个对应hash

pagesize:

每页的条数

current:

当前页码,默认为1

prevTpl

上一页的模板,默认“上一页”

nextTpl

下一页的模板,默认“下一页”

firstTpl

首页的模板,默认“首页”

lastTpl

末页的模板,默认“末页”

ellipseTpl

省略号的模板,默认“...”

toolbar: bool

是否显示工具栏,默认为false

pageSizeList:[]

当显示工具栏时有效,可设置每页条数,默认为[5,10,15,20]

callback:function(page,size,count)

翻页时的回调方法,page为当前页码,size为每页条数,count为总页数

changePagesize:function(pagesize,currenpage,pagecount)

修改每页的条数,参数为int

go:function(p)

跳转至某一页,默认到current

render:function(ops)

重新渲染,ops:{count:int,pagesize:int,current:int,pagecount:int}