DataTables列过滤器
2015-06-29 17:01
190 查看
var table = $('#example').DataTable(); table.columns().flatten().each( function ( colIdx ) { // Create the select list and search operation var select = $('<select />') .appendTo( table.column(colIdx).footer() ) .on( 'change', function () { table .column( colIdx ) .search( $(this).val() ) .draw(); } ); // Get the search data for the first column and add to the select list table .column( colIdx ) .cache( 'search' ) .sort() .unique() .each( function ( d ) { select.append( $('<option value="'+d+'">'+d+'</option>') ); } );
相关文章推荐
- OAuth 2.0系列教程(七) 请求和响应
- Android调试-真机调试不显示logcat的解决方案
- jasperreport5.6.0生成报表另存为html格式
- VS2008试用版到期的解决办法
- 对mongodb的shard机制的一点测试
- 安卓开发—帐号登录,自动登录功能
- 输入一串字符,输出单词的个数
- SAE稀疏编码机
- egret笔记之gui内设置动画效果
- 用SVN下载编译Spring v4.1.6.RELEASE源码导入eclipse
- Android 混淆代码总结
- 应用退出
- [日志处理工作之四]从flume采集的event中提取能被kibana识别的时间戳 and 对比flume与logstash
- OAuth 2.0系列教程(五) 授权
- Storm中的process,thread,task和spout对象实例,bolt对象实例
- oj刷(1)4对象数组
- 第十六周oj刷题——Problem G: E2 驾驭const
- JS中getElementById()、getElementsByName()、getElementsByTagName()_的区别和应用
- talend hive数据导入到mysql中
- Win7下chm文件无法打开问题解决方法