AutoCAD 3DMAX C语言 Pro/E UG JAVA编程 PHP编程 Maya动画 Matlab应用 Android
Photoshop Word Excel flash VB编程 VC编程 Coreldraw SolidWorks A Designer Unity3D
 首页 > JavaScript

修复jQuery tablesorter无法正确排序的bug(加千分位数字后)

51自学网 http://www.wanshiok.com
jquery_tablesorter,tablesorter排序

找到函数:

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,tablesorter排序  
上一篇:Jquery轮播效果实现过程解析  下一篇:JavaScript 经典实例日常收集整理(常用经典)