手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >修复jQuery tablesorter无法正确排序的bug(加千分位数字后)
修复jQuery tablesorter无法正确排序的bug(加千分位数字后)
摘要:找到函数:functiongetElementText(config,node){vartext="";if(!node)return"";...

找到函数:

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 tablesorter无法正确排序的bug(加千分位数字后)】相关文章:

JQuery控制Radio选中方法分析

浅谈jQuery构造函数分析

一个很简单的办法实现TD的加亮效果.

浅谈javascript的call()、apply()、bind()的用法

一个很简单的办法实现TD的加亮效果.

gameboy网页闯关游戏(riddle webgame)--仿微信聊天的前端页面设计和难点

免费空间广告万能消除代码

JavaScript中用sort()方法对数组元素进行排序的操作

什么是Node.js?

jQuery fancybox在ie浏览器下无法显示关闭按钮的解决办法

精品推荐
分类导航