DataTables

DataTables 是 jQuery Javascript 库的插件。 它可为任何HTML表添加高级交互控制功能。(DataTables is a plug-in for the jQuery Javascript library. It add advanced interaction controls to any HTML table.)

Github星跟踪图







DataTables 是 jQuery Javascript 库的插件。 它是一个高度灵活的工具,基于逐步增强的基础,并为任何HTML表添加高级交互控制功能。

功能

  • 分页,即时搜索和多列排序
  • 支持几乎任何数据源:DOM,Javascript,Ajax和服务器端处理
  • 轻松设置主题:DataTables,jQuery UI,Bootstrap,Foundation
  • 各种扩展包。编辑器,按钮,固定列等
  • 丰富的选项和一个漂亮的、富有表现力的API
  • 完全国际化
  • 专业质量:2900套单元测试支持
  • 免费开源软件(MIT许可证)!也提供商业支持。
  • 表视口的滚动选项
  • 智能处理列宽
  • 状态保存
  • 隐藏列
  • 动态创建表
  • Ajax自动加载数据
  • 自定义DOM定位
  • 单列过滤
  • 替代分页类型
  • 非破坏性的DOM相互作用
  • 对列进行排序以突出显示
  • 高级数据源选项
  • 商业支持
  • 完全访问屏幕阅读器/键盘访问
  • 合理的文件大小:78K minified,26K gzip'd
  • 广泛的插件支持
  • 排序,类型检测,API函数,分页和过滤
  • 坚实的文档和接口参考
  • 130+预构建示例

主要指标

概览
名称与所有者DataTables/DataTablesSrc
主编程语言JavaScript
编程语言PHP (语言数: 6)
平台
许可证MIT License
所有者活动
创建于2013-06-25 10:49:09
推送于2025-04-22 15:31:41
最后一次提交2025-04-22 15:31:02
发布数97
最新版本名称2.2.2 (发布于 2025-02-04 15:49:58)
第一版名称1.10.0-beta.1 (发布于 2014-02-04 10:42:27)
用户参与
星数694
关注者数55
派生数441
提交数4.1k
已启用问题?
问题数163
打开的问题数42
拉请求数95
打开的拉请求数26
关闭的拉请求数54
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?

DataTables plug-in for jQuery - source repository

This git repository contains the un-built source files for DataTables - the table enhancing plug-in for jQuery. If you are looking to use DataTables, rather than to modify it, please use the built files in the build repo: //github.com/DataTables/DataTables. There are instructions there on how to use DataTables, and on the DataTables site which contains the full documentation for DataTables.

Installing DataTables

To use DataTables, the primary way to obtain the software is to use the DataTables downloader. You can also include the individual files from the DataTables CDN. See the documentation for full details.

NPM and Bower

If you prefer to use a package manager such as NPM or Bower, distribution repositories are available with software built from this repository under the name datatables.net. Styling packages for Bootstrap, Foundation and other styling libraries are also available by adding a suffix to the package name.

Please see the DataTables NPM and Bower installation pages for further information. The DataTables installation manual also has details on how to use package managers with DataTables.

Why two repos

The source repo for DataTables is kept distinct from the built repo in order to provide separation between generated files and source files. The majority of the files in the DataTables built repo are generated by compiling source files from this repo, including:

  • Main Javascript file - compiled from multiple individual Javascript files
  • CSS files -compiled from SASS files
  • Examples - compiled from a common data source data and HTML template files

This separation allows developers who simply want to use DataTables as is, to do so, while keeping the source repo clean of generated files.

Building

DataTables can be built using the make.sh script in the /build directory of this repo. Simply check out the repo, cd into the build folder and run bash make.sh --help to get a full list of the options available for the build process. bash make.sh build will be the most common (with bash make.sh build debug available for quick testing - it skips the minification steps for speed).

A number of programs are required out your computer to be able to build DataTables:

The build script assumes that a Mac or Linux environment is being used - Windows builds are not currently directly supported (although would be possible using Cygwin). Additionally, you may need to alter the paths for the above programs to reflect where they are installed on your own computer - this can be done in the build/include.sh script.

The output files are placed into built/DataTables/ which is a temporary directory. No changes should be made in that directory as they will be overwritten when you next build the software.

Documentation

Full documentation of the DataTables options, API and plug-in interface are available on the DataTables web-site. The site also contains information on the wide variety of plug-ins that are available for DataTables, which can be used to enhance and customise your table even further.

Support

Support for DataTables is available through the DataTables forums and commercial support options are available.

License

DataTables is release under the MIT license. You are free to use, modify and distribute this software, but all copyright information must remain.