mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
Docs: add parsed values function no longer wraps empty content
This commit is contained in:
parent
0924a98a2b
commit
aa315b1e88
@ -216,13 +216,16 @@
|
||||
// append hidden parsed value to cell
|
||||
// used by feet-inch-fraction & metric parser demos
|
||||
window.addParsedValues = function($t, cols, format){
|
||||
var r,
|
||||
var r, val,
|
||||
$r = $t.find('tbody tr'),
|
||||
c = $t[0].config.cache[0].normalized;
|
||||
$r.each(function(i){
|
||||
r = this;
|
||||
$.each(cols, function(v,j){
|
||||
r.cells[j].innerHTML += ' <span class="val hidden removeme">(<span class="results">' + (format ? format(c[i][j]) : c[i][j]) + '</span>)</span>';
|
||||
val = format ? format(c[i][j]) : c[i][j];
|
||||
if (val !== '') {
|
||||
r.cells[j].innerHTML += ' <span class="val hidden removeme">(<span class="results">' + val + '</span>)</span>';
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user