This article mainly introduces how to fix the bug of jQuerytablesorter's incorrect sorting (after the number is added to the number of thousands). For more information, see
Find the 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;}
Change the function of the upper limit to the lower limit:
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,''));}
The above content is a bug introduced by xiaobian to fix the incorrect sorting of jQuery tablesorter. I hope it will help you!