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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:39:29+00:00 2026-06-09T23:39:29+00:00

I have a table. Now I cloned it. when I am using the tablesorter

  • 0

I have a table. Now I cloned it. when I am using the tablesorter it is saying cannot use it on a type object.

So, how can i cast it to object.

var clonedTable = $('#originalTable').clone(); 
$(clonedTable).tablesorter({ 
widgets: ['zebra'],  
headers: { 
 0:{sorter:false}, 
 1:{sorter:false},
 2:{sorter:false},
 3:{sorter:false},
 4:{sorter:false} } 
}); 

Here tablesorter is complaining that: uncaught type error. object[object object] has no method tablesorter

Edit:

Digging more into code… i notice the cause is this line:

 var clonedTableRows= $('clonedTable tr:gt(0)'); 

looks like clonedTableRows is empty… Is my syntax wrong?

  • 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-09T23:39:31+00:00Added an answer on June 9, 2026 at 11:39 pm

    As @nbrooks said, the quotes shouldn’t be around the clonedTable variable. Try this instead:

    var clonedTableRows = clonedTable.find('tr:gt(0)');
    

    Also, you are initializing the plugin on a cloned object that isn’t attached to the DOM. Append the cloned table somewhere, then initialize the plugin:

    var clonedTable = $('#originalTable').clone()
          // remove duplicate ID
          .removeAttr('id')
          // append it whatever you want
          .appendTo('body')
          // now that it's in the DOM, initialize the plugin
          .tablesorter({ 
            widgets: ['zebra'],  
            headers: { 
              0:{sorter:false}, 
              1:{sorter:false},
              2:{sorter:false},
              3:{sorter:false},
              4:{sorter:false}
            } 
          });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two table first is TABLE_SUBJECT and second is TABLE_CHAPTER.Now i want to
I have a checkboxlist.When I check one the value will appear in a table.Now
After creating the parse tree, i have to populate symbol table now. I have
I have a large table (~1M rows now, soon ~10M) that has two ranked
I have a table named with Sales having the following columns: Sales_ID|Product_Code|Zone|District|State|Distributor|Total_Sales Now i
I have some code that shows results in a table Right now it will
I have a table: Employee (employeeID) EmployeeRank (rankID, employeeID) Now I have another table
I have a table with lots of generic link from a DB. Now the
I have a table with columns 'id', 'name', 'value', 'uniqueConst' in both databases. Now
I am working on an auction web application. Now i have a table with

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.