js page click
page
Page change event - fired when the table's paging is updated.
Description
The page
event is fired the table's paging state changes. This can be the end user selecting the page to view or the page length from the built-in controls, or when the page state is altered by the API (page()
).
Note that the page
will be fired before the table has been redrawn with the updated data.
Please note that, as with all DataTables emitted events, this event is triggered with the dt
namespace. As such, to listen for this event, you must also use the dt
namespace by simply appending .dt
to your event name, as shown in the example below.
Type
function function( e, settings )
- Parameters:
-
Name Type Optional 1 e
No jQuery event object
2 settings
No DataTables settings object
Example
Show information about the current page using the API:
1
2
3
4
5
6
|
var table = $( '#example' ).DataTable(); $( '#example' ).on( 'page.dt' , function () { var info = table.page.info(); $( '#pageInfo' ).html( 'Showing page: ' +info.page+ ' of ' +info.pages ); } ); |
Related
The following options are directly related and may also be useful in your application development.
Comments (0)
Post new comment
Contributions in the form of tips, code snippets and suggestions for the above material are very welcome. To post a comment, please use the form below. Text is formatted by Markdown.
To post comments, please sign in to your DataTables account, or register:
Any questions posted here will be deleted without being published.
Please post questions in the Forums. Comments are moderated.
SpryMedia Ltd is registered in Scotland, company no. SC456502.
最新文章
- shell script 执行常用的两种方式
- linux 正则表达式使用
- senlin __init__() got an unexpected keyword argument 'additional_headers'
- JAVA Arrays.binarySearch
- iOS 界面调试利器Reveal
- Smart210学习记录------块设备
- java.util.Date转java.sql.Date丢失时间问题
- POJ 3904 Sky Code
- 锋利的Jquery解惑系列(二)------插件开发大总结
- linux中的网络通信指令 分类: 学习笔记 linux ubuntu 2015-07-06 16:02 134人阅读 评论(0) 收藏
- MYSQL 体系结构图-log (踏雪无痕) (UC技术博客)
- [webapi] 如何在查看api时 显示api的说明
- Java中常用Cache机制的实现
- 谷歌开源图片压缩算法Guetzli实测体验报告
- 用css3动画 @keyframes里设置transform:rotate(); 控制动画暂停和运动用属性:animation-play-state:paused暂停,在微信和safari里设置paused无效,在QQ里是正常的
- [补档]暑假集训D8总结
- 2017ecjtu-summer training #5 UVA10382
- Android服务——Service
- HashTable和HashMap
- Ubuntu 16.04配置Java Web开发环境