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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:56:59+00:00 2026-05-26T13:56:59+00:00

I am currently working on a website which includes using Datatables. After customizing a

  • 0

I am currently working on a website which includes using Datatables. After customizing a lot, it looks quite like a regular SERP.

The feature I want to implement:
On page load only the input box should be displayed and the data rows should be hidden until a search string is entered.

So it actually should behave like you see it on known Search engines. I didn’t find info about on datatables’ forum or here.

It tried using jQuery keypress() but it did not worked. I tried hiding the table on keypress, didn’t worked at all (just to get started).

$("#inputbox").keypress(function () {
      $("table.display").css("display":"none");
    });

But toggle works fine:

$("#button").click(function () {
      $("table.display").slideToggle();
    });

So the problem is somehow with the input box and the keypress function I guess.

Would be really glad to get some feedback here.

  • 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-26T13:56:59+00:00Added an answer on May 26, 2026 at 1:56 pm

    You could hide/show the table according to the fact that there are rows:

    $('table').hide();
    $('#inputbox').keyup(function(e) {
       var numRows = $('table tr').length;
       if(numRows >0){
        $('table').show();
       }else{
         $('table').show();    
       }
    });
    

    in this case is uppose you are filtering the table using datatables filtering engine (which is what you should do instead of filtering the data yourself)

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

Sidebar

Related Questions

I am currently working on a website which has a lot of javascript .
I am currently working on a website which lists the businesses as per either
I am currently working on a website which needs images to be uploaded. I
I am currently working on a website and lately have been using GD with
I am currently working on a social networking website, and I would like the
I'm currently working on a website which main function is to search a relatively
Situation: I am currently working on a website-design which requires me to fill up
I am currently working on my portfolio website which uses a very simple navigation.
I am currently working on a Joomla! website. I am using the Jumi extension
The website I'm working on currently has a print-icon which pop ups a printer-friendly

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.