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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:34:19+00:00 2026-05-24T13:34:19+00:00

I am doing a Chrome Extention now. Cause, this extension will modify a TAB

  • 0

I am doing a Chrome Extention now.
Cause, this extension will modify a TAB table content and then needs resorting.

After I did a research, I find that jQuery tablesorter does not sort the Modified table updated by local extension script.

I can do $(‘table’).trigger(‘update’) then rebuild the table using tablesorter IF I am doing this in TAB content script.

But the truth is that, my script is in isolated environment, which can not access content script variable or function or object.

If I rebuild the tablesorter in my extension script, the table will responds TWICE, which is silly.

What can I do to solve this problem. Thanks. Mason.


@Darin, I tried your points
It sitll does NOT WORK.

$("#xftw").after($("#pio").clone(0, 0));
$("#pio").eq(0).empty();


$("#pio").tablesorter({
    headers: {
        0: {
            sorter: false
        },
        2: {
            sorter: false
        },
        6: {
            sorter: "digit"
        },
        10: {
            sorter: false
        }
    },
    sortInitialOrder: "desc",
    sortList:[[7,1]],
    textExtraction: function (node) {
        if ($(node).attr("extraction") == "my") return "0" + $(node).find("span").text();
        var $firstNode = $(node).find(":first-child");
        return $firstNode.length <= 0 ? $(node).html() : $firstNode.html()
    },
    debug:true
});

var usersTable = $("#pio");
usersTable.trigger("update")
  .trigger("appendCache")
  .trigger("sorton", [[[6,1], [7,1]]]);
  • 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-24T13:34:21+00:00Added an answer on May 24, 2026 at 1:34 pm

    Rebuild the table, hide the original table, set your new table that you control in its place.

    Or use .preventDefault() when you .trigger

    Or change the id or classname of the table then work on it and .trigger


    Some rough code on creating a new table based on the old table.

    function copyTable(){
      var newTRs = [];
      var theTable = $(#tableID);
      var theRows = theTable.getElementsByTagName('tr');
    
      for (var i=0; i < theRows.length; i++){
        //you could also evaluate each row here and manipulate it as needed.
        newTRs.push(theRows[i].cloneNode(true));
      }
      return newTRs;
    }
    
    function buildNewTable(){
        var allRows = copyTable();
        var newTable = document.createElement('table');
    
        newTable.appendtherows(allRows);
        oldTable.attr('display','none');//or use a .class to hide old table
        $(newTable).appendTo(oldTablesDiv);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing a Chrome extension and I got helped in this post here .
I'm trying to create a chrome extension and im doing this by parsing an
This is what I'm doing right now. var foo = function() { var x
I'm trying to create an extension using this docs: http://code.google.com/chrome/extensions/content_scripts.html I want a part
I've included jQuery by doing this: <?xml version=1.0?> <!DOCTYPE window SYSTEM chrome://orkutmanager/locale/browser.dtd> <overlay id=omcore
I'm writing a Chrome extension that needs to maintain a list of <object> and
I'm working on a Chrome extension that injects content into the tumblr 'new posts'
Edit: On further examination Firefox does not seem to be doing this, but Chrome
I have written an extension in Google Chrome that opens a tab to a
I'm writing a Chrome extension that involves doing a lot of the following job:

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.