源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

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

  • 时间:2022-01-12 19:00 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:修复jQuery tablesorter无法正确排序的bug(加千分位数字后)
[b]找到函数:[/b]
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;
}
[b]把上邊的function改成下邊的即可:[/b]
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,希望对大家有所帮助!
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部