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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:30:05+00:00 2026-05-29T11:30:05+00:00

I want to hide a div on a page load using jquery js. And

  • 0

I want to hide a div on a page load using jquery js. And then on a click of a button i want to show that div. i am not able to do even trying it so hard..
above shown below are My jquery function and
The Div that i want to kept hidden on page load and shown on a button click event.

<div id="newDiv">
            <fieldset class="fieldset">
                <legend>Add Salary Allounce Type:</legend>
                <table cellpadding="0" cellspacing="0" align="center" class="table">
                    <tr>
                        <td>
                            <asp:Label ID="LabelAllounceType" runat="server" Text="Allounce Type:"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="LabelAllounceType1" runat="server" Text="Allounce Type:"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </fieldset>
<asp:Button ID="ButtonAddNew" runat="server" Text="Add New Type" OnClientClick="" />`
        </div>
<script>
     $(document).ready(function () {
                $('#ButtonAddNew').click(function () {
                    $('#newDiv').hide();
                });

            }); 
</script>
  • 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-29T11:30:06+00:00Added an answer on May 29, 2026 at 11:30 am

    well, your code says that when you click the button, the div should be hidden. You probably want something more like:

    $(document).ready( function () {
      $('#newDiv').hide(); // make sure the div is hidden on page load.  You could also
                           // accomplish this by making it have a style of display: none
    
      $('#buttonAddNew').click( function () { 
        // when the button is clicked, show the div.
        $('#newDiv').show(); 
      });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to hide a div using Javascript, as soon as the page gets
I'm using WebBrowser control to load my page. I want to hide all the
I want to hide the Next button on my ASP.NET Wizard control using JavaScript.
I am using a simple Asp.Net button and trying to hide it on page
I'm using the jQuery load() event to load a page into an iframe. The
I have a page with a load of tables on that are created using
I want to hide the cursor when showing a webpage that is meant to
I want to hide all mysql error messages without using mysql_error() . Are there
I want to hide text which is in <span> . but why it's not
I'm trying to build a site that runs without refreshes, using Jquery and PHP

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.