修復(fù)jQuery tablesorter無法正確排序的bug(加千分位數(shù)字后)
找到函數(shù):
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,''));
}
以上內(nèi)容是小編給大家介紹的修復(fù)jQuery tablesorter無法正確排序的bug,希望對大家有所幫助!
相關(guān)文章
jQuery中(function($){})(jQuery)詳解
本文通過具體示例向大家詳細(xì)介紹了jQuery中的(function($){})(jQuery)的用法和意義,對此有相同困惑的小伙伴可以參考下本文。2015-07-07
jquery調(diào)整表格行tr上下順序?qū)嵗v解
這篇文章主要為大家介紹了jquery調(diào)整表格行tr上下順序?qū)嵗?,具有一定的參考價(jià)值,感興趣的朋友可以參考一下2016-01-01
jQuery 常見學(xué)習(xí)網(wǎng)站與參考書
打算學(xué)習(xí)jquery的朋友可以參下如下網(wǎng)上,參考書嗎,可以看下 鋒利的jquery腳本之家提供電子版下載。2009-11-11
jquery.uploadifive插件怎么解決上傳限制圖片或文件大小問題
jQuery.uploadifive插件可以很好的解決上傳限制圖片或文件大小問題,具體實(shí)例代碼大家參考下本文2017-05-05
使用jQuery時(shí)Form表單元素ID和name命名大忌
將自己的表單元素ID和name命名為了nodeName,在chrome瀏覽器下報(bào)錯(cuò),結(jié)果發(fā)現(xiàn)是表單元素命名的原因2014-03-03
動態(tài)設(shè)置form表單的action屬性的值的簡單方法
下面小編就為大家?guī)硪黄獎討B(tài)設(shè)置form表單的action屬性的值的簡單方法。小編覺得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2016-05-05
jquery如何根據(jù)值設(shè)置默認(rèn)的選中項(xiàng)
這篇文章主要介紹了jquery如何根據(jù)值設(shè)置默認(rèn)的選中項(xiàng),需要的朋友可以參考下2014-03-03

