page

Since: DataTables 1.10

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

object

No
 

jQuery event object

2 settings

DataTables.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.

Events

 

Comments (0)

No comments posted for this page yet. Be the first to contribute!

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.

DataTables designed and created by SpryMedia Ltd © 2007-2016. MIT licensed. Our Supporters
SpryMedia Ltd is registered in Scotland, company no. SC456502.

js page click的更多相关文章

  1. 2.26 js解决click失效问题

    2.26 js解决click失效问题 前言有时候元素明明已经找到了,运行也没报错,点击后页面没任何反应.这种问题遇到了,是比较头疼的,因为没任何报错,只是click事件失效了.本篇用2种方法解决这种诡 ...

  2. js & right click menu & 鼠标滑词

    js & right click menu & 鼠标滑词 // 鼠标滑词 mouseSlipGetWords() { const getSelectionText = () => ...

  3. js & right click menu

    js & right click menu https://stackoverflow.com/questions/4909167/how-to-add-a-custom-right-clic ...

  4. trao 模拟点击 & js auto click

    trao 模拟点击 & js auto click 日历上选择某一天,在 scrollview 自动定位到选择的那一天 click 后获取 item 的 e.target.offsetLeft ...

  5. js trigger click event & dispatchEvent & svg element

    js trigger click event & dispatchEvent & svg element but svg element not support trigger cli ...

  6. angularjs 1 开发简单案例(包含common.js,service.js,controller.js,page)

    common.js var app = angular.module('app', ['ngFileUpload']) .factory('SV_Common', function ($http) { ...

  7. 微信小程序 --- 设置app.js/page.js参数的方法

    设置 app.js 文件: //app.js App({ globalData: { is_login:false, userInfo:{} } }) 设置gloabalData的方法: // 定义a ...

  8. selenium+Python(Js处理click失效)

    有时候元素明明已经找到了,运行也没报错,点击后页面没任何反应.这种问题遇到了,是比较头疼的,因为没任何报错,只是 click 事件失效了. 问题: 1.在练习百度的搜索设置按钮时,点保存设置按钮,al ...

  9. jq和js中click 事件的几种方式总结和click事件的累加问题解决办法

     1:常见的三种绑定click事件: 第一种:$("#click").click(function(){ alert("Hello World  click") ...

随机推荐

  1. 玛雅游戏[NOIP2011]

    题目描述 Mayan puzzle 是最近流行起来的一个游戏.游戏界面是一个7 行5 列的棋盘,上面堆放着一些方块,方块不能悬空堆放,即方块必须放在最下面一行,或者放在其他方块之上.游戏通关是指在规定 ...

  2. 尝试在CentOS7.2上编译安装Swift

    苹果提供 Ubuntu上构建Swift 的教程,通过这个教程我尝试使用CentOS7.2上玩儿一把.目前已经成功在CentOS7.2上班成功安装 swift 4.0 https://github.co ...

  3. C# Process.Start()

    本文转自:http://webcache.googleusercontent.com/search?q=cache:v4Sh6GlfJPYJ:blog.csdn.net/czw2010/article ...

  4. .net Ajax使用

    function CheckUsername() { var strName = $("#txtUserName").val(); $.ajax({ type: "GET ...

  5. C# 6.0 内插字符串 (Interpolated Strings )

    讲Interpolated Strings之前,让我们先看EF Core 2.0 的一个新的特性:String interpolation in FromSql and ExecuteSqlComma ...

  6. trie从入门到入殓

    trie是什么?1. 字典树 2.集合 (其实两个都对啊喂) 一颗普通的trie树一般类似于这样(图片来源于http://dongxicheng.org/structure/trietree/): 绿 ...

  7. 采药 NOIP 2005 普及组

    题目描述 辰辰是个天资聪颖的孩子,他的梦想是成为世界上最伟大的医师.为此,他想拜附近最有威望的医师为师.医师为了判断他的资质,给他出了一个难题.医师把他带到一个到处都是草药的山洞里对他说:" ...

  8. Matlab学习笔记(2)

    1. 在MATLAB中默认最开始出现的是命令窗口,也就是Command Window.对应的文件保存后扩展名一般都 是.mat 真正的程序代码编辑窗口应该新建New Script或者其他的.此时保存的 ...

  9. S7-300之间的PROFIBUS-DP主从通信

    一.PROFIBUS-DP简介 1.由来 2..总线连接器 二.系统结构示例 三.组态过程示例 三,DP网络组态 1.新建一个项目和两个300站点如下 2.组态从站DP网络 1)点击常规中的属性 2) ...

  10. shell 编程案例整理

    一.统计成绩文件 [zheng@localhost ~]$ cat score.txt ngsan lisi 81.5 wangwu zhangsan lisi wangwu zhangsan lis ...