Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8130489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:43:45+00:00 2026-06-06T08:43:45+00:00

In JavaScript code of web application, the table sorter is defined by: $(#my-table).tablesorter({ headers:

  • 0

In JavaScript code of web application, the table sorter is defined by:

$("#my-table").tablesorter({
    headers: { 
       1: { 
               sorter: false
           }
    },
    widgets: ["saveSort"] 
});

So when the page is refreshed the sorting of table is saved, but when browser is closed, the table backs to its original sorting. So what I want is to get how table is sorted and save it to database. Can someone suggest me how I can obtain the cookie(s), which stores how table is sorted?
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T08:43:47+00:00Added an answer on June 6, 2026 at 8:43 am

    When the saveSort widget (demo) saves the information, it tests the browser for localStorage first, then if that isn’t available, it falls back to saving the sort to a cookie. So, you can either use the function built into the widgets file like this:

    var myTable = $('#table1')[0],
        myLastSort = $.tablesorter.storage( myTable, 'tablesorter-savesort');
    

    or if you are using Chrome, go to that page and press F12. now click on the resources tab and look under “Local Storage”

    saveSort

    The value may look a bit confusing, but it’s just a JSON format:

    {
        "/tablesorter/docs/example-widget-savesort.html": {
            "0": {
                "sortList": [ [0,0],[2,1] ]
            },
            "1": {
                "sortList": [ [0,0] ]
            }
        }
    }
    

    And it is broken down as follows:

    • “/tablesorter/docs/example-widget-savesort.html” is the url of the web page
    • “0” or “1” would either be the table ID or the index of the table on the page
    • “sortList” contains the actual sort list value

    So as you can see in the above data, it is saving sort information for two tables on one web page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading javascript web application and the author is using following code: mod.load
Question : Beginner Level Code: Pure Javascript I had created a web page in
I'm trying to debug some Javascript code inside a JSP page in a web
I have a web application that loads javascript on page load: $(function() { $('.modal-delete').click(function()
I am trying to emulate a web browser in order to execute JavaScript code
I look for tool which can compress JavaScript source code. I found some web
Possible Duplicate: && operator in Javascript In the sample code of the ExtJS web
I have an idea for a web application where a user can submit Javascript
I have a web application, written in PHP that incorporates Javascript and JQuery, that
I'm currently writing a web application in HTML5/Javascript and PHP. Some employees of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.