From f4d454a4322eebebe250a88567d13470fc5e19d0 Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Thu, 15 Feb 2018 13:13:44 -0600 Subject: [PATCH] Sticky-headers: Allow nested tables in sticky header See https://stackoverflow.com/q/48793036/145346 --- js/widgets/widget-stickyHeaders.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/widgets/widget-stickyHeaders.js b/js/widgets/widget-stickyHeaders.js index 5cc596a9..67fdf857 100644 --- a/js/widgets/widget-stickyHeaders.js +++ b/js/widgets/widget-stickyHeaders.js @@ -213,8 +213,8 @@ if ($stickyTable.attr('id')) { $stickyTable[0].id += wo.stickyHeaders_cloneId; } // clear out cloned table, except for sticky header // include caption & filter row (fixes #126 & #249) - don't remove cells to get correct cell indexing - $stickyTable.find('thead:gt(0), tr.sticky-false').hide(); - $stickyTable.find('tbody, tfoot').remove(); + $stickyTable.find('> thead:gt(0), tr.sticky-false').hide(); + $stickyTable.find('> tbody, > tfoot').remove(); $stickyTable.find('caption').toggle(wo.stickyHeaders_includeCaption); // issue #172 - find td/th in sticky header $stickyCells = $stickyThead.children().children();