mricle / mricode.pagination Goto Github PK
View Code? Open in Web Editor NEWjQuery分页插件
jQuery分页插件
Hello,
The pagination looks great. Thanks for your hard work. I have a question. How do I use Font Awesome icons in place of the prev, <<, next, >>, Go text on the pagination?
Thanks
ajaxCallBack: function (result) {
var total = utility.mapObjectNameRecursion(result, this.options.remote.totalName);
if (total == null || total == undefined)
throw new Error("the response of totalName : '" + this.options.remote.totalName + "' not found.");
total = utility.convertInt(total);
this.total = total;
var lastPageNum = this.getLastPageNum();
if (this.currentPageIndex > 0 && lastPageNum - 1 < this.currentPageIndex) {
this.setPageIndex(lastPageNum - 1);
this.remote();
} else {
if (typeof this.options.remote.success === 'function') this.options.remote.success(result);
this.renderPagination();
}
},
代码中total的赋值不够灵活,这样的赋值方式固定死了返回的数据格式
必须如下:data = {total: 'xxx'}
,实际返回数据格式是不确定的,所以这块最好在 this.options.remote暴露出来。
我们系统设计的是从第一页开始,没有第0页
可以持续open状态, 用于反馈体验下的优化建议.
在IE和chrome上运行test例子都出现问题,chrome是指无法请求data.json。大概是url不支持。IE上莫名其妙说btn_search没有定义,删除后还是没有什么效果。真是分页插件都没一个简单好用的。
已经得到结果是4页了 但是分页按钮只显示了一个 不知道为什么
很多情况下, 是在原有的param上进行部分参数的修改, 然后发请求.
已存在setParam, 建议提供一个getParam,
这样在海量的参数中, 一个获得原有的, 修改部分参数, 然后在set.
因为在set中直接extend也不太好把控.
一些时候请求错误,这时候需要错误回调,只在控制台扔出一个错误信息有时候不够。
比如没有符合查询条件的时候,需要返回一个错误提示,现在无法实现.
我直接在源码里url里加了个随机数解决的,有更好的办法吗
建议js里加上github地址
setPageIndex is failed
请问只支持jquery2.0以后的版本吗?
我使用的是jquery1.9.1,老是报错
怎么跨域获取总条数,不想手动修改
Uncaught TypeError: Cannot read property 'pageSizeItems' of undefined mricode.pagination.js:79
我看了代码,这一行少了一对括号(粗体),应写成:
this.options.pageSizeItems = options.pageSizeItems || ((
Hello,
Is there anyone available to help me with integrating this pagination with my PHP database? I would like to use this script to pull images from my database one page at a time as the user clicks through the pagination links.
Thanks
我该如何配置呢
谢谢你写的这个插件。 不过在手机上输入框不能使用,这个问题,我这边应该怎么改。
setPageIndex: function (pageIndex) {
if (pageIndex !== undefined && pageIndex !== null) {
this.currentPageIndex = utility.convertInt(pageIndex);
}
}
可以看出来仅仅是赋值给了当前页码,并没有对已经存在的分页做相应的处理哇?
这个方法是用来做什么用的?
提交了pull requests
setParams 里面改不了
选择 pageSize 一页显示多少天数据体验(bug);
一共10条数据. 每页显示5条, 两页可以正常分页, 当选择pageSize为15后, 只有一页数据了, 但是, 分页组件不显示分页操作元素了, 只能重新查询或者刷新页面了. 体验不好, 建议就算只有一页, 不需要隐藏.
就是默认生成分页时候,把首页和上一页显示出来,不需要点击第二页才显示。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.