修复jQuery tablesorter无法正确排序的bug(加千分位数字后)
2016-03-30 11:18
756 查看
找到函数:
function getElementText(config, node) { var text = ""; if (!node) return ""; if (!config.supportsTextContent) config.supportsTextContent = node.textContent || false; if (config.textExtraction == "simple") { if (config.supportsTextContent) { text = node.textContent; } else { if (node.childNodes[0] && node.childNodes[0].hasChildNodes()) { text = node.childNodes[0].innerHTML; } else { text = node.innerHTML; } } } else { if (typeof(config.textExtraction) == "function") { text = config.textExtraction(node); } else { text = $(node).text(); } } return text; }
把上邊的function改成下邊的即可:
function getElementText(config, node) { var text = ""; if (!node) return ""; if (!config.supportsTextContent) config.supportsTextContent = node.textContent || false; if (config.textExtraction == "simple") { if (config.supportsTextContent) { text = node.textContent; } else { if (node.childNodes[0] && node.childNodes[0].hasChildNodes()) { text = node.childNodes[0].innerHTML; } else { text = node.innerHTML; } } } else { if (typeof(config.textExtraction) == "function") { text = config.textExtraction(node); } else { text = $(node).text(); } } return (text.replace(/,/g,'')); }
以上内容是小编给大家介绍的修复jQuery tablesorter无法正确排序的bug,希望对大家有所帮助!
您可能感兴趣的文章:
- jQuery html表格排序插件tablesorter使用方法详解
- jQuery排序插件tableSorter使用方法
- jquery.tableSort.js表格排序插件使用方法详解
- 针对后台列表table拖拽比较实用的jquery拖动排序
- 通过jquery-ui中的sortable来实现拖拽排序的简单实例
- jQuery实现带分组数据的Table表头排序实例分析
- jQuery表格排序组件-tablesorter使用示例
- 用jquery.sortElements实现table排序
- jquery实现的鼠标拖动排序Li或Table
- jquery中的sortable排序之后的保存状态的解决方法
- JQuery 构建客户/服务分离的链接模型中Table中的排序分析
- jquery tablesorter.js 支持中文表格排序改进
- jquery实现的table排序功能示例
相关文章推荐
- JQuery1——基础($对象,选择器,对象转换)
- JavaScript演示排序算法
- 2015-2016网页设计趋势分析 Web Design of Trends
- 在命令行用 sort 进行排序
- jQuery Ajax 跨域调用
- 移动端的长按事件
- jquery教程靠边站,一分钱不花让你免费学会jquery
- JQuery+Strusts1.x无刷新登录
- $.ajax()方法详解
- jQuery ajax - ajax() 方法
- JavaScript 各种遍历方式详解
- 数组方法汇总
- 文件遍历排序函数
- jQuery Html控件基本操作(日常收集整理)
- jQuery插件实现文字无缝向上滚动效果代码
- jQuery菜单插件用法实例
- JQuery 初体验(建议学习jquery)
- 基于Jquery和CSS3制作数字时钟附源码下载(CSS3篇)
- Jquery实现的table最后一行添加样式的代码
- jQuery实现向下滑出的平滑下拉菜单效果