简要咨询咨询QQ网站导航网站搜索手机站点联系我们设为首页加入收藏 

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

来源:易贤网   阅读:1061 次  日期:2016-07-14 17:08:07

温馨提示:易贤网小编为您整理了“修复jQuery tablesorter无法正确排序的bug(加千分位数字后)”,方便广大网友查阅!

这篇文章主要介绍了如何修复jQuery tablesorter无法正确排序的bug(加千分位数字后)的相关资料,需要的朋友可以参考下

找到函数:

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,希望对大家有所帮助!

更多信息请查看网络编程
点此处就本文及相关问题在本站进行非正式的简要咨询(便捷快速)】     【点此处查询各地各类考试咨询QQ号码及交流群
上一篇:Jquery轮播效果实现过程解析
下一篇:JavaScript 经典实例日常收集整理(常用经典)
易贤网手机网站地址:修复jQuery tablesorter无法正确排序的bug(加千分位数字后)
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!