mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
pager processAjaxOnInit works with jQuery objects. Fixes #572
This commit is contained in:
parent
502130d4a3
commit
b8cdca396f
@ -297,8 +297,10 @@
|
||||
}
|
||||
l = d.length;
|
||||
if (d instanceof jQuery) {
|
||||
if (p.processAjaxOnInit) {
|
||||
// append jQuery object
|
||||
c.$tbodies.eq(0).empty().append(d);
|
||||
}
|
||||
} else if (l) {
|
||||
// build table from array
|
||||
for ( i = 0; i < l; i++ ) {
|
||||
@ -312,10 +314,9 @@
|
||||
// add rows to first tbody
|
||||
if (p.processAjaxOnInit) {
|
||||
c.$tbodies.eq(0).html( tds );
|
||||
} else {
|
||||
}
|
||||
}
|
||||
p.processAjaxOnInit = true;
|
||||
}
|
||||
}
|
||||
// only add new header text if the length matches
|
||||
if ( th && th.length === hl ) {
|
||||
hsh = $t.hasClass('hasStickyHeaders');
|
||||
|
@ -486,8 +486,10 @@ tsp = ts.pager = {
|
||||
}
|
||||
l = d.length;
|
||||
if (d instanceof jQuery) {
|
||||
if (wo.pager_processAjaxOnInit) {
|
||||
// append jQuery object
|
||||
c.$tbodies.eq(0).empty().append(d);
|
||||
}
|
||||
} else if (l) {
|
||||
// build table from array
|
||||
for ( i = 0; i < l; i++ ) {
|
||||
@ -501,10 +503,9 @@ tsp = ts.pager = {
|
||||
// add rows to first tbody
|
||||
if (wo.pager_processAjaxOnInit) {
|
||||
c.$tbodies.eq(0).html( tds );
|
||||
} else {
|
||||
}
|
||||
}
|
||||
wo.pager_processAjaxOnInit = true;
|
||||
}
|
||||
}
|
||||
// only add new header text if the length matches
|
||||
if ( th && th.length === hl ) {
|
||||
hsh = $t.hasClass('hasStickyHeaders');
|
||||
|
Loading…
Reference in New Issue
Block a user