From 8aafc9c11922f947ed385a45b25a4eae08c7f183 Mon Sep 17 00:00:00 2001 From: Mottie Date: Wed, 14 Nov 2012 08:47:09 -0600 Subject: [PATCH] fix selector error iOS + jQuery 1.8+ - fixes issue #132 --- js/jquery.tablesorter.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js index 83cfe531..d421821e 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -173,7 +173,10 @@ l = rows[0].cells.length; for (i = 0; i < l; i++) { // tons of thanks to AnthonyM1229 for working out the following selector (issue #74) to make this work in IE8! - h = c.$headers.filter(':not([colspan])[data-column="' + i + '"]:last,[colspan="1"][data-column="' + i + '"]:last'); + // More fixes to this selector to work properly in iOS and jQuery 1.8+ (issue #132 & #174) + h = $headers.filter(':not([colspan])'); + h = h.add( $headers.filter('[colspan="1"]') ) // ie8 fix + .filter('[data-column="' + i + '"]:last'); ch = c.headers[i]; // get column parser p = ts.getParserById( ts.getData(h, ch, 'sorter') );