Home > Web Front-end > JS Tutorial > Extend jquery to implement paging and sorting function code of client tables_jquery

Extend jquery to implement paging and sorting function code of client tables_jquery

WBOY
Release: 2016-05-16 18:09:23
Original
1044 people have browsed it

Download code and examples: jqueryPaging.rar

Usage is as follows:

Copy code The code is as follows:



If you only use the paging function: $("#myTable").tablePaging ();

Parameter description:

id: jQuery(this).attr('id'), // ID of the table to be paginated
pageSize: 10, // Single The number of records displayed on the page, the default is 10
sorting: false, //Whether to sort, the default is not sorting
sortDirection: 'asc', //The sort order, the default is ascending
sortSelector: '', //Sort the selected columns. Here you need to set a class for td to identify. You can see the demonstration from the example
sortType: '', //Number types supported by sorting, 'number', 'string', 'date'
onPaged: null // Bind event after sorting

Look at the paging effect:
Extend jquery to implement paging and sorting function code of client tables_jquery
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template