Last active
August 29, 2015 19:59
-
-
Save NateJLewis/3fb7286600147c3d2607 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function () { | |
var styleArray = [ 'CT', 'PFT', 'LT', 'VT', 'MCT', 'GRT', 'LS', 'H' ]; | |
styleArray.sort(function(a,b) { | |
return $.tablesorter.sortNatural(a, b); | |
}); | |
var sizeArray = [ 'S', 'M', 'L', 'XL', '2XL', '3XL', '4XL']; | |
sizeArray.sort(function(a,b) { | |
return $.tablesorter.sortNatural(a, b); | |
}); | |
$("#list_by_scs").tablesorter({ | |
theme: 'bootstrap', | |
ignoreCase: false, | |
usNumberFormat: true, | |
delayInit: false, | |
initWidgets: true, | |
headers: { | |
8: { sorter: styleArray }, | |
9: $.tablesorter.sortNatural, | |
10: { sorter: sizeArray } | |
}, | |
sortList: [ | |
[8, 0], | |
[9, 0], | |
[10, 0] | |
], | |
widgets: [ 'math'], | |
widgetOptions: { | |
math_data : 'math', // data-math attribute | |
math_ignore : [1,2,3,4,5,6,7,8,9,10], | |
math_mask : '#,###.##' | |
}, | |
ignoreCase: true, | |
sortForce: [[8,0]], | |
sortRestart: false, | |
debug: true | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment