From f06a5460547963bb8aca793ed7b0868976abe28f Mon Sep 17 00:00:00 2001 From: Mottie Date: Mon, 31 Mar 2014 17:45:08 -0500 Subject: [PATCH] Ignore child row if it is the first table row --- js/jquery.tablesorter.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js index a1f73c86..9b9f2752 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -290,7 +290,8 @@ c = $(b[k].rows[i]); cols = []; // if this is a child row, add it to the last row's children and continue to the next row - if (c.hasClass(tc.cssChildRow)) { + // ignore child row class, if it is the first row + if (c.hasClass(tc.cssChildRow) && i !== 0) { tc.cache[k].row[tc.cache[k].row.length - 1] = tc.cache[k].row[tc.cache[k].row.length - 1].add(c); // add "hasChild" class name to parent row if (!c.prev().hasClass(tc.cssChildRow)) {