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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:25:26+00:00 2026-06-07T23:25:26+00:00

Scenario: I’ve a page with multiple DIVs. Some of the DIVs should be hidden

  • 0

Scenario:
I’ve a page with multiple DIVs. Some of the DIVs should be hidden on first page load. I’ve used Jquery hide() function to hide the DIVs.

Problem:
For some reason the jquery hide function seems to be working only partially i.e. the DIV that needs to be hidden completely shows for a second and hides.

Is there anyway to resolve this please?

  • 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-07T23:25:28+00:00Added an answer on June 7, 2026 at 11:25 pm

    Your javascript won’t be executed until the DOM is ready (you can’t hide an element that doesn’t exist yet) so the browser renders it then hides it. Depending on how fast your browser is and how efficient your code is you may or may not notice it.

    A far better solution is to have the element be hidden from it is loaded, using css.

    #elementId { display:none; }
    

    You would include this rule within style tags with the rest of your css. If you have many elements that you want to hide/show, give them all a common class name; then you can toggle their visibility all at once. The css for that would be:

    .commonClassName { display:none; }
    

    Then in your jQuery you can call .show() to show them, or .toggle() to toggle their visibility on/off. The jQuery class selector is identical to the css one:

    $('.commonClassName').show();
    

    Note: You can also make styling changes using the html style attribute:
    style="display:none;" But, for the reasons I outline in the comments, this is usually not the route to take.

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

Sidebar

Related Questions

Scenario first :- I'm using Entity Framework to do some queries, to build my
Scenario: I have configured SQOOP on my PC. But I am facing some problem
Scenario: There are multiple C structs, each of which contains a function pointer to
Scenario: Every page on the website will have a menu bar at the top
Scenario: I start out in my app's main page. I navigate to sub-page A,
Scenario: I am calling a function that returns a field that the user enters
Scenario: I am working on a Android project where in one particular openGL page,
Scenario: First activity starts seconds activity with startActivityForResult Second activity starts third activity with
Scenario: I want to develop an application.The application should be able to connect to
Scenario: User is viewing a screen with an image and some accompanying text in

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.