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

  • Home
  • SEARCH
  • 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 6132795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:08:48+00:00 2026-05-23T17:08:48+00:00

This is a common question but I have a slight twist to it so

  • 0

This is a common question but I have a slight twist to it so hopefully it’s not a duplicate:

I have a situation where I need to trigger .show() on elements that are rendered with display: none on page load. In ideal situations, I show everything on a page, then hide what needs to be hidden. Most clients hate the ‘flash’ of rendering, though, so they usually balk at that.

What I need to do now is grab the width of the element that is set to display: none; There are lots of ways to do this but traditionally have been a bit hacky such as ‘clone the html, set to block, do your calculations, remove clone’ type things.

The ‘twist’ to the question is: are there newer/better/default standard ways to do this with the more recent versions of jQuery (1.6.*)? Or do we still revert to rolling our own workaround?

  • 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-23T17:08:49+00:00Added an answer on May 23, 2026 at 5:08 pm

    In some situations, you can set to position: absolute, visibility: hidden, display: block to cause it to have it’s proper size (though not constrained by anything around it because it’s been removed from the layout), but not be visible and not affect the layout of the page. Then, set back to display: none, position: static and visibility: visible to put it back the way it was.

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

Sidebar

Related Questions

I know this might be a common question but I have tried to search
This is a pretty common question, but I could not find this part: Say
This is probably a common question, but all answers on the internt have failed
This is a common question, but the explanations found so far and observed behaviour
This is probably a common Objective-C question reported by Java coders, but I don't
This has to be a common question that all programmers have from time to
Fairly common question this, to which I have a few answers and I'm nearly
I thought this could've been a common question, but it has been very difficult
Okay, I know this is a common enough question, but all the solutions I've
I know this a common question but everything I found seems to remove white

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.