Skip to content

Instantly share code, notes, and snippets.

Last active November 24, 2015 15:43
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
<!doctype html>
<title>TableSort Demo</title>
<th class="default-sort">Weekday</th>
<td data-sort="11-23-2015">23.11.2015</td>
<td data-sort="11-24-2015">24.11.2015</td>
<td data-sort="11-26-2015">26.11.2015</td>
<td data-sort="11-27-2015">27.11.2015</td>
<td data-sort="11-25-2015">25.11.2015</td>
<script async defer src="./bundle.js"></script>
var Tablesort = require("tablesort");
// Just the require needed, as the sort-method extends the Tablesort prototype
var table = document.querySelector("table");
var sort = new Tablesort(table);
"scripts": {
"build": "browserify index.js > bundle.js"
"browserify-shim": {
"./sorts/": {
"depends": "tablesort:Tablesort"
"browserify": {
"transform": ["browserify-shim"]
"dependencies": {
"tablesort": "*",
"browserify": "*",
"browserify-shim": "*"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment