Sortable results for a horizontal accordioned table grid
I have an accordion grid script that I've been working on for some time now. The whole concept behind it is to offer groups of columns that are expandable/collapsible by category (horizontally) to help reduce horizontal scrolling in the browser. 

The problem I'm encountering now is that because the script is breaking up the data by category (the code returns all rows of data for a given category, closes tables and lists, then moves on to next category), I'm having a really hard time wrapping my head around how to make everything sortable. 

I need this script to function is a way where the user can click on any given category or column heading to sort all rows by the clicked category or column heading. 

**[I've created a demo version of my script to help show people how the code is structured for the grid.][1]** It's kind of difficult to explain otherwise. 

Any suggestions are greatly appreciated. 


  [1]: http://redapplefalls.net/_projects/expand-test/demo.html
Sortable results for a horizontal accordioned table grid
===

I have an accordion grid script that I've been working on for some time now. The whole concept behind it is to offer groups of columns that are expandable/collapsible by category (horizontally) to help reduce horizontal scrolling in the browser. 

The problem I'm encountering now is that because the script is breaking up the data by category (the code returns all rows of data for a given category, closes tables and lists, then moves on to next category), I'm having a really hard time wrapping my head around how to make everything sortable. 

I need this script to function is a way where the user can click on any given category or column heading to sort all rows by the clicked category or column heading. 

**[I've created a demo version of my script to help show people how the code is structured for the grid.][1]** It's kind of difficult to explain otherwise. 

Any suggestions are greatly appreciated. 


  [1]: http://redapplefalls.net/_projects/expand-test/demo.html