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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:59:48+00:00 2026-06-17T04:59:48+00:00

I add a table dynamically to the page through ajax call, the table is

  • 0

I add a table dynamically to the page through ajax call, the table is paginated and again uses ajax call for pagination. but when I try to use jQuery plugins to sort the table it doesn’t work.

<script>
var targetURL = 'http://localhost/includes/qrmanager.php?start=' + pageno;   

    $('#qrmanager').html('<p><img src="images/ajax-loader.gif" /></p>');        
    $('#qrmanager').load( targetURL ).hide().fadeIn('slow'); //this loads the table within the div

 $("table").tablesort( );
</script>

I have a plugin for tablesort(), it works if I just echo the table via php without using ajax.

  • 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-17T04:59:49+00:00Added an answer on June 17, 2026 at 4:59 am

    You’re attempting to sort the table before AJAX has a chance to load it.

    Use the success callback to the .load method instead:

    var targetURL = 'http://localhost/includes/qrmanager.php?start=' + pageno;   
    $('#qrmanager').html('<p><img src="images/ajax-loader.gif" /></p>');
    $('#qrmanager').load( targetURL, function() {
        $(this).hide().fadeIn('slow'); 
        $("table").tablesort( );
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to be able to add rows to a table dynamically with jQuery
I am using the Jquery table addrow plugin to add row dynamically, the code
I am trying to use JavaScript to add rows to a table dynamically using
I have a table of data that I need to dynamically add a column
How to add table of contents to R Markdown HTML file using pandoc but
I am trying to add a table in aspx page and need to have
If I create ImageButton dynamically and add this into table cell TableRow tr =
Him I'm trying to add a jQuery tooltip to a dynamically generated list, the
I'm trying to add rows dynamically to a System.Web.UI.WebControls.Table control in ASP.NET. I found
I am adding three tables dynamically in widget containing table widget and labels, but

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.