Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ezdata/f7dfcf6d35ef9f2e2484d8a17a43b7e2 to your computer and use it in GitHub Desktop.
Save ezdata/f7dfcf6d35ef9f2e2484d8a17a43b7e2 to your computer and use it in GitHub Desktop.
Visual Indicator of Sort Order - Works with Stupid-Table-Plugin
/*
* Very simple way of adding arrows that
* indicate column sort order.
* Of course, you'll need to create
* arrow images for the ascending and
* descending.
* This CSS is made to work with Stupid-Table-Plugin
* https://github.com/joequery/Stupid-Table-Plugin
*/
th[data-sort]{
cursor:pointer;
}
th[data-sort].sorting-asc::after{
content: url('/images/ascending.png') ;
}
th[data-sort].sorting-desc::after{
content: url('/images/descending.png') ;
}
@ezdata
Copy link
Author

ezdata commented Jan 11, 2019

Here are the two image files that I've used.
ascending
descending

@ezdata
Copy link
Author

ezdata commented Jan 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment