JqueryDataTables Study Notes (1)

Source: Internet
Author: User
Description: DataTables is a jQuery table plug-in. This is a highly flexible tool based on a step-by-step enhancement that will add advanced interactive control and support for any HTML table. Main features: & amp; bull; automatic paging & amp; bull; real-time table data filtering & amp; bull; data sorting and quantity... SyntaxHi

Description: DataTables is a jQuery table plug-in. This is a highly flexible tool based on a step-by-step enhancement that will add advanced interactive control and support for any HTML table.
Main features:
• Automatic Paging
• Real-Time Table Data Filtering
• Automatic data sorting and data type detection
• Automatically process column width
• Styles can be customized through CSS
• Supports column hiding
• Ease of use
• Scalability and flexibility
• Internationalization
• Dynamically create a table
• Free
Parameter initialization:
BAutoWidth
Enable auto-fit column width?
Default Value: True
Sample Code:
$ (Document). ready (function (){
$ ('# Example'). dataTable ({
"BAutoWidth": false
});
});
 
BDeferRender
Whether to enable delayed loading: when using the AJAX data source, you can increase the speed.
Default Value: False
Sample Code:
$ (Document). ready (function (){
Var oTable = $ ('# example'). dataTable ({
"SAjaxSource": "sources/arrays.txt ",
"BDeferRender": true
});
});
 
BFilter
Whether to enable the built-in search function: You can search across columns.
Default Value: True
Sample Code:
$ (Document). ready (function (){
$ ('# Example'). dataTable ({
"BFilter": false
});
});
 
BInfo
Whether to display table-related information, such as paging information.
Default Value: True
Sample Code:
$ (Document). ready (function (){
$ ('# Example'). dataTable ({
"BInfo": false
});
});
 
BJQueryUI
Whether to enable jQuery UI skin plug-in support
Default Value: False
Sample Code:
$ (Document). ready (function (){
$ ('# Example'). dataTable ({
"BJQueryUI": true
});
});
 
BLengthChange
Whether to allow users. Select the page size (10, 25, 50 and 100) from the drop-down list.
Default Value: True
Sample Code:
$ (Document). ready (function (){
$ ('# Example'). dataTable ({
"BLengthChange": false
});
});
 
BPaginate
Enable paging?
Default Value: True
Sample Code:
$ (Document). ready (function (){
$ ('# Example'). dataTable ({
"BPaginate": false
});
});

BProcessing
Whether to enable progress display and progress bar, which is useful for processing a large amount of data.
Default Value: false
Sample Code:
$ (Document). ready (function (){
$ ('# Example'). dataTable ({
"BProcessing": true
});
});
 
BScrollInfinite
Whether to enable the built-in scroll bar and display all data
Default Value: fasle
Sample Code:
 
$ (Document). ready (function (){
$ ('# Example'). dataTable ({
"BScrollInfinite": true,
"BScrollCollapse": true,
"SScrollY": "200px"
});
});
 
 
BServerSide
Whether to enable the server to process the data source. sAjaxSource must be used to specify the data source location.
Default Value: False
Sample Code:
 

$ (Document). ready (function (){
$ ('# Example'). dataTable ({
"BServerSide": true,
"SAjaxSource": "xhr. php"
});
});
 
 
BSort
Whether to enable column sorting. If you want to disable column sorting, you can set the bSortable parameter for each column.
Default Value: True
Sample Code:
$ (Document). ready (function (){
$ ('# Example'). dataTable ({
"BSort": false
});
});

BSortClasses
I don't know what it is for. If a large amount of data is processed, it must be disabled (does anyone know ?)
Default Value: False
Sample Code:
$ (Document). ready (function (){
$ ('# Example'). dataTable ({
"BSortClasses": false
});
});

BStateSave
Whether to enable cookies to save the current status information
Default Value: false
Sample Code:
$ (Document). ready (function (){
$ ('# Example'). dataTable ({
"BStateSave": true
});
});

SScrollX
Whether to enable horizontal scroll bars
Default Value: NULL (string type)
Sample Code:
$ (Document). ready (function (){
$ ('# Example'). dataTable ({
"SScrollX": "100% ",
"BScrollCollapse": true
});
});
 
SScrollY
Whether to enable the vertical scroll bar. The size of the scroll bar is limited by the height of the able.
Default Value: NULL (string type)
Sample Code:
$ (Document). ready (function (){
$ ('# Example'). dataTable ({
"SScrollY": "200px ",
"BPaginate": false
});
});

 

 

From cnkker.com

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.