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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:41:58+00:00 2026-06-16T00:41:58+00:00

I’m developing a web app, which present few (~5) different data tables in different

  • 0

I’m developing a web app, which present few (~5) different data tables in different views.
I tried hiding the top row with the columns name, for just one of the data tables (but keep the other with this row), but with no success.
Most of the solutions I found are using CSS, which caused this row to disappear from all data tables in my app.
Does anybody know a good solution for that?

Here is an example of how I’m creating a data table in my app:

this._currentDiv = $('<div></div>');
this._stopsTable = $('<table></table>');
$(this._currentDiv).append(this._stopsTable);
$(this._currentDiv).append(self._stopsTable);
        $(this._currentDiv).append(data);
        $(this._stopsTable).dataTable({
            "bJQueryUI": true,
            "bPaginate":false,
            "bLengthChange":false,
            "bFilter":false,
            "bSort":false,
            "bInfo":false,
            "bAutoWidth":false,
            "sScrollY": "100px",
            "aoColumns":[
                { "sTitle":"a" },
                { "sTitle":"b" },
                { "sTitle":"c" }
            ]
        });

and here is the css code I tried:

.dataTables_wrapper table thead {
    display:none;
}

I prefer a JavaScript solution if available.

  • 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-16T00:41:59+00:00Added an answer on June 16, 2026 at 12:41 am

    If you want a javascript solution, you can use the fnInitComplete parameter of datatable.

    $(this._stopsTable).dataTable({
        "bJQueryUI": true,
        "bPaginate":false,
        "bLengthChange":false,
        "bFilter":false,
        "bSort":false,
        "bInfo":false,
        "bAutoWidth":false,
        "sScrollY": "100px",
        "aoColumns":[
            { "sTitle":"a" 
               "sTitle":"b" 
               "sTitle":"c" }
        ],
        "fnInitComplete" : function(oSettings, json) {
            // Find the wrapper and hide all thead
            $(this._stopsTable).parents('.dataTables_wrapper').first().find('thead').hide();
        }
    });
    

    When jQuery datatable use a scroll, the html structure is very different. jQuery datatables use a “second table” to handle the thead. So you can scroll and look at the thread anytime.
    So if you want to remove the good thead, you need to retrieve the dataTable wrapper.

    Of course, if you do that way for all tables, it will hide all thead of all your tables. So you must use something to know if you must hide the first row for the current table (a css class or an attribute on the table).

    Here a jsfiddle as example : http://jsfiddle.net/LqSwt/5/

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

Sidebar

Related Questions

I am writing an app for my school newspaper, which is run completely online
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I'm interested in microtypography issues on the web. I want a tool to fix:
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

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.