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

  • Home
  • SEARCH
  • 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 9229145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:30:00+00:00 2026-06-18T05:30:00+00:00

I have such html table: here: http://jsfiddle.net/zrjaM/1/ And such js for sorting: $(document).ready(function() {

  • 0

I have such html table:
here: http://jsfiddle.net/zrjaM/1/

And such js for sorting:

$(document).ready(function() { 
    $(".sortable") 
    .tablesorter({sortList: [[4,0]], widgets: ['zebra']});
}); 

But i need to sort via 0-th column to…. i write:

$(document).ready(function() { 
        $(".sortable") 
        .tablesorter({sortList: [[0,0],[4,0]], widgets: ['zebra']});
    }); 

but it works strange…

Also i need to do that, tr’s with price value (4-th column) are on top, but now, when i sort only by price – all is ok, but when via two columns, i could have tr’s with price both in end or middle…. How to send them to top, and sort first via 0-th, then via sorter 0-th sort via 4-t column…. How to do it?

  • 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-18T05:30:02+00:00Added an answer on June 18, 2026 at 5:30 am

    I figured out a possible solution.

    First check rows for no price, if no price add a hidden span before item name in first column the text ZZZZZZZ in it. This forces all the ZZZZZZZ items to bottom and you get a double sort alphabetic on first row

    $('tbody tr').each(function(){
        if( $.trim( $(this).find('td').eq(4).text())==''){
           $(this).find('td').eq(0).prepend('<span style="display:none">ZZZZZZZZ</span>')
           }
    });
    
    $(".sortable") .tablesorter({
          sortList: [[0,0],[4,0]], widgets: ['zebra']});
    }); 
    

    DEMO: http://jsfiddle.net/zrjaM/6/

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

Sidebar

Related Questions

assume I have a such html order <div id=header>>Header(logo, navigation menus etc)will be here,
Here's my problem: I have an HTML table that looks like this: What I
I have such html piece of code: <ul class=myClass> <li><a href=url1.html>first link</a></li> <li><a href=url2.html>second
I have such files to parse (from scrapping) with Python: some HTML and JS
I have always and will continue to always close an HTML input such as
I have a HTML form with fields such as name, address, notes, etc. I
I have a relatively simple HTML / JavaScript form. Such as this: <form method='POST'
I have a lot of files such as JavaScript, HTML, and even C and
I have a table with a large amount of HTML in it that I
I have a HTML (table) order form. Users need to fill in various cells

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.