修復(fù)jQuery tablesorter無(wú)法正確排序的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無(wú)法正確排序的bug,希望對(duì)大家有所幫助!
相關(guān)文章
jQuery實(shí)現(xiàn)的點(diǎn)擊按鈕改變樣式功能示例
這篇文章主要介紹了jQuery實(shí)現(xiàn)的點(diǎn)擊按鈕改變樣式功能,涉及jQuery基于事件響應(yīng)的頁(yè)面元素樣式動(dòng)態(tài)操作相關(guān)實(shí)現(xiàn)技巧,需要的朋友可以參考下2018-07-07
jquery對(duì)所有input type=text的控件賦值實(shí)現(xiàn)方法
下面小編就為大家?guī)?lái)一篇jquery對(duì)所有input type=text的控件賦值實(shí)現(xiàn)方法。小編覺(jué)的挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2016-12-12
jquery中的ajax方法怎樣通過(guò)JSONP進(jìn)行遠(yuǎn)程調(diào)用
這篇文章主要介紹了jquery中的ajax方法怎樣通過(guò)JSONP進(jìn)行遠(yuǎn)程調(diào)用,需要的朋友可以參考下2014-05-05
jquery 利用show和hidden實(shí)現(xiàn)級(jí)聯(lián)菜單示例代碼
級(jí)聯(lián)菜單的實(shí)現(xiàn)方法有很多,在本文為大家介紹下使用show和hidden輕松實(shí)現(xiàn)下級(jí)聯(lián)效果,感興趣的朋友可以參考下,希望對(duì)大家有所幫助2013-08-08
學(xué)習(xí)jQuery中的noConflict()用法
在本篇文章中我們整理了關(guān)于學(xué)習(xí)jQuery中的noConflict()用法的相關(guān)知識(shí)點(diǎn)內(nèi)容,有需要的朋友們可以學(xué)習(xí)下。2018-09-09
JQuery拖動(dòng)表頭邊框線調(diào)整表格列寬效果代碼
當(dāng)鼠標(biāo)停留在表頭邊框線上,接著拖動(dòng)鼠標(biāo),會(huì)在表格中出現(xiàn)一條隨鼠標(biāo)移動(dòng)的豎線,最后放開(kāi)鼠標(biāo),表格列寬會(huì)被調(diào)整2014-09-09
jQuery實(shí)現(xiàn)鼠標(biāo)移到某個(gè)對(duì)象時(shí)彈出顯示層功能
這篇文章主要介紹了jQuery實(shí)現(xiàn)鼠標(biāo)移到某個(gè)對(duì)象時(shí)彈出顯示層功能,涉及jQuery基于事件響應(yīng)動(dòng)態(tài)操作頁(yè)面元素屬性相關(guān)實(shí)現(xiàn)技巧,需要的朋友可以參考下2018-08-08

