Add state information to the URL hash.
Sort by ID | First | DOB | Status
ID First Name Last Name Job Title DOB Status
2 Isidra Boudreaux Traffic Court Referee 22 Jun 1972 Active
3 Shona Woldt Airline Transport Pilot 3 Oct 1981 Disabled
1 Granville Leonardo Business Services Sales Representative 19 Apr 1969 Suspended
8 Easer Dragoo Drywall Stripper 13 Dec 1977 Active
4 Maple Halladay Aviation Tactical Readiness Officer 30 Dec 1991 Suspended
5 Maxine Woldt Business Services Sales Representative 17 Oct 1987 Disabled
6 Lorraine Mcgaughy Hemodialysis Technician 11 Nov 1983 Disabled
9 Lizzee Goodlow Technical Services Librarian 1 Nov 1961 Suspended
10 Judi Badgett Electrical Lineworker 23 Jun 1981 Active
7 Lauri Hyland Blackjack Supervisor 15 Nov 1985 Suspended

Check out the getting started demo to see how to setup FooTable.

Include Bookmarkable Add-On

Include the bookmarkable add-on javascript file to make your table sortable:

<script src="path_to_your_js/footable.bookmarkable.js" type="text/javascript"></script>

Enable "bookmarkable" when you initialize footable:

<script type="text/javascript">
		  $(function () {
		  $('.footable').footable({
   		      bookmarkable: { enabled: true }
		  });
		  });
</script>

Bookmarkable

The bookmarkable add-on maintains state in the URI fragment (hash) as user actions modify the view of a table, and reads state from the URI fragment when initializing. This allows a user to save a URL to a specific view of the table.

The bookmark tracks which rows are expanded, and if you are using the sorting, filtering, or pagination plug-ins, also tracks those features. In this demo, sorting is enabled. See the showcase demo for another example.

If your footable has an id, it will be included in the parameters in the bookmark -- so if you have more than one footable on a page, they can be tracked separately.

Note that bookmarking is disabled by default, so you must include this in the configuration you pass to the footable function to get bookmarks:

bookmarkable: { enabled: true }