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 7049179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:58:53+00:00 2026-05-28T02:58:53+00:00

See http://jsfiddle.net/RPHA7/ . I’m using jQuery tablesorter . In the jsfiddle, there are two

  • 0

See http://jsfiddle.net/RPHA7/.

I’m using jQuery tablesorter.

In the jsfiddle, there are two columns (Colors and Animals) that begin in an unsorted state. When you click on “Colors”, it sorts by that column in ascending order (Blue, Green, etc…). If you then click on “Animals”, it sorts by that column also in ascending order (Aardvark, Dolphin, etc…). If you then click on “Colors” a second time, it sorts it in descending order (Red, Purple, etc…).

This seems counter-intuitive. I would expect it to toggle ascending/descending only if you click on the same column over and over. Clicking on a different column should always start the sort for that column in ascending order, regardless of any prior state.

Is there a setting in jQuery tablesorter (or some hack) to make it work like this?

  • 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-05-28T02:58:54+00:00Added an answer on May 28, 2026 at 2:58 am

    ok you have to add a few lines in the jquery.tablesorter.js:

    on line 727 you should have : this.order = this.count++ % 2;

    just after it insert the following lines:

    for(var trc in $headers)
    {
        if(trc != i)
            $headers[trc].count = 0;
    }
    

    That’s it 🙂

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

Sidebar

Related Questions

Please see: http://jsfiddle.net/XEbKy/3/ I have two layers of tabs. On the top layer I
I want to create an arrow using CSS only Example you can see http://jsfiddle.net/b9Yfc/
See http://jsfiddle.net/ZdjrT/ - The text under the first two thumbnails is partially obscured. I
I have a list of lists. Sublists are floated left. See http://jsfiddle.net/P4Psf/ Is there
See http://jsfiddle.net/tAfkU/ When I'm looping through an array, how can I refer to the
See http://jsfiddle.net/FDhQF/1/ for a trivial example. What's the difference between something being undefined and
Google-chrome renders the font family(type) fantasy in bold. see http://jsfiddle.net/Q7mQD/ image http://imageshack.us/photo/my-images/26/capturexgd.jpg/ How to
See here: http://jsfiddle.net/QVhAZ/4/ How can I use * but only have it apply to
I have this code I'm working on, see link: http://jsfiddle.net/PqsAD/3/ The problem is depending
See this fiddle: http://jsfiddle.net/Bg9Zx/5/ Relevant code: <fieldset data-role=controlgroup data-type=horizontal id=locate-me> <input type=checkbox name=loc id=loc

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.