Adapted from Mingsong Hu's Block D3.js Sortable & Responsive Table
gh-pages demo
Also on jsFiddle
This table is created using a JSON object. Some table columns have string values and the others have numerical values. The string values need to be sorted alphabetically and the others numerically.
The alphabetical columns are hard coded for alphabetical sorting.
if (d == "name" || d == "club" || d == "category") { //these keys sort alphabetically