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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:53:01+00:00 2026-06-01T09:53:01+00:00

I am using the jQuery DataTable plug-in and can not see to find a

  • 0

I am using the jQuery DataTable plug-in and can not see to find a way to make it scroll to the bottom of the table when the data loads via AJAX.

So the basic layout of my page has two 3 jQuery DataTables on it. From what I see by inspecting the rendered code is that the plug-in will create a div wrapper with an id of “myTableid_wrapper” with two children a header and the table.

Now if the table is triggers the scrolling ability then the table will again be wrapped in another div with overflow:hidden so the table can be scrolled.

This div has a class name of “dataTables_scrollBody”. Here is an example of a table that has not triggered the scroll feature.

<div id="myTable1_wrapper" class="dataTables_wrapper" >
  <div id="case_activity_table_filter">no worried about this guy</div>
    <table id="myTable1" >does not matter whats in here</table>
</div>

Here is the general layout of a table that has triggered the scroll feature of the plugin. As you can see the div with the class “dataTables_scrollBody” is auto-generated by the plugin.

<div id="myTable2_wrapper" class="dataTables_wrapper" >
  <div id="case_activity_table_filter">no worried about this guy</div>
  <div class="dataTables_scrollBody" style="overflow:hidden" >
    <table id="myTable2" >does not matter whats in here</table>
  </div>
</div>

Both of these tables reside on the same page. Both of these tables may or may not have the scroll div.

Is there way to target class “dataTables_scrollBody” and have it scroll bottom when the table is created via 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-01T09:53:02+00:00Added an answer on June 1, 2026 at 9:53 am

    assuming you initialized the datatable like this:

    var oTable = jQuery('#myTable1').dataTable({
        "bProcessing": true,
        "bPaginate": false,
        "sScrollY": "200",
        "bScrollCollapse": true
    });
    

    you can just do:

    oTable.parent().scrollTop(9999);
    

    you can increase the amount to scroll if you will have more data, or there’s probably a way to find out the height of the table including the overflow part.

    with ajax you might have to put the scrollTop code in the “fnInitComplete” callback function, so it’s executed after the table is rendered.

    …

    Another idea: maybe you can reverse the order of the rows with aaSorting, then you don’t have to do any scrolling.

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

Sidebar

Related Questions

I'm using the jQuery DataTables plug-in for my HTML table. Is there a way
I'm using jQuery DataTable to form a table out of this data.txt: { aaData
I'm using jQuery datatables plug-in on my HTML Table. I wanted to know how
i want to show my input data from DB...i'm interest for using jquery dataTable...
I am using a Jquery's datatable. I have a table with id = affectedRegion.
I have a column with buttons in a table I'm using jQuery datatable plugin.
In jQuery Datatable I am fetching data using Ajax i.e. Server Side Processing. Situation
Hello i am using Jquery data table to display a table from the server
I am having some problems creating custom types for my data table, using jquery.datatables.js.
I am using jQuery Datatable plugin for rendering a table as jQuery DataTable. I

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.