mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Zebra: apply style one row. Fixes #715
This commit is contained in:
parent
d4a5cc196a
commit
3aa474012d
@ -1863,22 +1863,19 @@
|
||||
}
|
||||
for (k = 0; k < b.length; k++ ) {
|
||||
// loop through the visible rows
|
||||
$tb = b.eq(k);
|
||||
l = $tb.children('tr').length;
|
||||
if (l > 1) {
|
||||
row = 0;
|
||||
$tb = b.eq(k);
|
||||
$tv = $tb.children('tr:visible').not(c.selectorRemove);
|
||||
// revered back to using jQuery each - strangely it's the fastest method
|
||||
/*jshint loopfunc:true */
|
||||
$tv.each(function(){
|
||||
$tr = $(this);
|
||||
// style children rows the same way the parent row was styled
|
||||
// style child rows the same way the parent row was styled
|
||||
if (!child.test(this.className)) { row++; }
|
||||
even = (row % 2 === 0);
|
||||
$tr.removeClass(wo.zebra[even ? 1 : 0]).addClass(wo.zebra[even ? 0 : 1]);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (c.debug) {
|
||||
ts.benchmark("Applying Zebra widget", time);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user