Skip to content

Commit 1f8b8db

Browse files
committed
Fix hack for not sorting precedence table, #4071
1 parent 40faba5 commit 1f8b8db

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

assets/js/main.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ $(function(){
88

99
function setup_tables() {
1010
$('.pod-table').each(function() {
11+
console.log( $(this).find('thead th:first-child' );
12+
console.log( $(this).find('thead th:first-child + th');
1113
if ($(this).find('thead').length
1214
&& $(this).find('tr').length > 10
1315
&& ! ( // don't sort operators precedence table
14-
$(this).find('thead th:first-child' ).text() == 'A'
15-
&& $(this).find('thead th:first-child + th').text() == 'Level'
16+
$(this).find('thead th:first-child' ).text() == 'Precedence Level'
17+
&& $(this).find('thead th:first-child + th').text() == 'Associativity'
1618
)) $(this).tablesorter({sortList: [[0,0]]})
1719
})
1820
}

0 commit comments

Comments
 (0)