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.
js page click的更多相关文章
- 2.26 js解决click失效问题
2.26 js解决click失效问题 前言有时候元素明明已经找到了,运行也没报错,点击后页面没任何反应.这种问题遇到了,是比较头疼的,因为没任何报错,只是click事件失效了.本篇用2种方法解决这种诡 ...
- js & right click menu & 鼠标滑词
js & right click menu & 鼠标滑词 // 鼠标滑词 mouseSlipGetWords() { const getSelectionText = () => ...
- js & right click menu
js & right click menu https://stackoverflow.com/questions/4909167/how-to-add-a-custom-right-clic ...
- trao 模拟点击 & js auto click
trao 模拟点击 & js auto click 日历上选择某一天,在 scrollview 自动定位到选择的那一天 click 后获取 item 的 e.target.offsetLeft ...
- js trigger click event & dispatchEvent & svg element
js trigger click event & dispatchEvent & svg element but svg element not support trigger cli ...
- angularjs 1 开发简单案例(包含common.js,service.js,controller.js,page)
common.js var app = angular.module('app', ['ngFileUpload']) .factory('SV_Common', function ($http) { ...
- 微信小程序 --- 设置app.js/page.js参数的方法
设置 app.js 文件: //app.js App({ globalData: { is_login:false, userInfo:{} } }) 设置gloabalData的方法: // 定义a ...
- selenium+Python(Js处理click失效)
有时候元素明明已经找到了,运行也没报错,点击后页面没任何反应.这种问题遇到了,是比较头疼的,因为没任何报错,只是 click 事件失效了. 问题: 1.在练习百度的搜索设置按钮时,点保存设置按钮,al ...
- jq和js中click 事件的几种方式总结和click事件的累加问题解决办法
1:常见的三种绑定click事件: 第一种:$("#click").click(function(){ alert("Hello World click") ...
随机推荐
- 67. Add Binary【LeetCode】
67. Add Binary Given two binary strings, return their sum (also a binary string). For example,a = &q ...
- GitLab Development Kit 环境搭建
在公司内网服务器上面搭建gdk环境,踩了很多坑,历时四五天(中间涉及申请开通固定外网),整理如下: 总览: 操作系统:redhat 6.3 参考文档:https://gitlab.com/gitlab ...
- NodeJS基本使用简介
Node.js 1.Nvm Node的版本管理工具,用于切换node的版本 一.下载nvm,放在纯英文路径 二.用命令行打开nvm.exe 三.打开setting.txt,其中有四个配置. Root: ...
- Git版本控制之多人协作
上篇文章我们主要简单的介绍了有关git的一些基本常识和一些简单的命令.但那终究是皮毛,我们使用git最主要的目的还是管理我们的项目,多人协作.本篇文章主要涉及以下两个大模块: 分支的概念及原 ...
- Connect By、Level、Start With的使用
--Connect By.Level.Start With的使用 --------------------------------------2013/11/20 Syntax 1 CONNECT B ...
- 关于MySQL buffer pool的预读机制
预读机制 两种预读算法 1.线性预读 2.随机预读 对预读的监控 一.预读机制 InnoDB在I/O的优化上有个比较重要的特性为预读,预读请求是一个i/o请求,它会异步地在缓冲池中预先回迁多个页面,预 ...
- Android手机客户端测试点(全)
网上看到一个整理比较完善的手机客户端测试:
- canvas基础语法
前面的话 canvas顾名思义是定义在浏览器中的画布.它不仅是一个普通的元素,更是一个强大的编程工具.它的出现已然超过了web基于文档的设计初衷,将网页这一形态的应用推向了另一个高度.利用canvas ...
- 设计模式原则(2)--Liskov Substitution Principle(LSP)--里氏替换原则
1.定义: 所有引用基类(父类)的地方必须能透明地使用其子类的对象.这一原则与继承紧密相关.如果对每一个类型为 T1的对象 o1,都有类型为 T2 的对象o2,使得以 T1定义的所有程序 P 在所有的 ...
- java核心技术卷一笔记(2)
---恢复内容开始--- 异常.断言 所有的异常都继承自Throwable类,异常包括已检查异常和未检查异常,应该抛出已检查异常,而未检查异常要么是不可控的(Error),要么是应该避免发生的(Run ...