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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:55:04+00:00 2026-05-21T10:55:04+00:00

I use the tablesorter to sort the table, but not all columns, I want

  • 0

I use the tablesorter to sort the table, but not all columns, I want to ignore the specific column with the defined class name, eg:

<table class="basicList" cellpadding="0" cellspacing="0"> 
                    <thead> 
                        <tr> 
                            <th class="ck_field"><input type="checkbox" id="check_all" name="check_all" /></th>
                            <th class="col_filter"><a href="#" class="btn_filter">&nbsp;</a></th>
                            <th>Name <span class="sort_indicator">&nbsp;</span></th> 
                        </tr> 
                        <tr class="filter_row"> 
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                            <td> <input type="text" id="the_name" name="name" class="filter_field"/></td> 
                        </tr>  
                    </thead>
                </table>

In this example, I don’t want to sort the first two columns.

And I tried:

$(document).ready(function() {

    console.log($(".basicList .col_filter").index());
    console.log($(".basicList .ck_field").index());

    var ck_ignore = $(".basicList .ck_field").index();
    var filter_ignore = $(".basicList .col_filter").index();

    $(".basicList").tablesorter({ widgets: ['zebra'],headers: { 
            //disable the first checkbox cell            
            $ck_ignore: {                
                sorter: false 
            },
            $filter_ignore : {                
                sorter: false 
            }
        }  
    });

Which doesn’t work, how to solve this problem?

  • 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-21T10:55:05+00:00Added an answer on May 21, 2026 at 10:55 am

    Use it like this:

    var myHeaders = {};
    myHeaders[ck_ignore] = { sorter: false };
    myHeaders[filter_ignore] = { sorter: false };
    
    $(".basicList").tablesorter({ widgets: ['zebra'], headers: myHeaders });
    

    Note: if you have more columns with these classes, it will work only for the first occurences.

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

Sidebar

Related Questions

My English is not good, sorry... I use tablesorter (tablesorter.com) to sort table in
I want to use Christian Bach's tableSorter client-side table sorting jQuery plugin with my
I have table: <table id=myTable class=tablesorter> <thead> <tr> <th>name</th> <th>secondname</th> <th>E-mail</th> <th>Salary</th> <th>web site</th>
Any idea on what keyboard shortcuts to use to access tablesorter controls in column
I am parsing an XML file into a table and want to use the
I am parsing an XML file into a table and want to use the
I'm currently working with a tablesorter table in which I need to use a
I have table like that : <table id=table_id class=tablesorter> <thead> <tr class=trheader> <th colspan=2>111</th>
In this JSFiddle http://jsfiddle.net/littlesandra88/mzPxN/ am I trying to use the tablesorter plugin to sort
i use this table sorterplugin with jquery http://tablesorter.com/ now my form looks from 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.