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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:23:03+00:00 2026-06-13T22:23:03+00:00

Please can I confirm $(#myElement).is(:visible); is only supposed to be true if the div

  • 0

Please can I confirm

$("#myElement").is(":visible"); 

is only supposed to be true if the div with id myElement is visible on the page.

I am finding that this is returning true regardless of whether myElement modified with:

$("#myElement").css("visibility","visible");

or

$("#myElement").css("visibility","hidden");

Where as:

$("#myElement").is(":visible")

returns false if myElement is modified with:

$("#myElement").css("display","none");

So in other words it may or may not be false if the element is not being displayed.

I have read and re-read the documentation. I must be missing something as I simply cannot pick out from the documentation why this is so. It does not say don’t use visibility hidden nor for that matter you must use display none.

So I am not sure that I am fully understanding the reason for this and what the pseudo selector :visible is acting on.

Note I have also had odd behaviour when attempting to use pseudo selector :animated.

Could anyone please explain what is happening here in particular in reference to :visible.

  • 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-13T22:23:05+00:00Added an answer on June 13, 2026 at 10:23 pm

    The first paragraph in documentation:

    Elements are considered visible if they consume space in the document.
    Visible elements have a width or height that is greater than zero.

    Visibility: hidden still takes space on the page

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

Sidebar

Related Questions

Can someone please confirm that the following is a bug with PHP 5.2.13: (thank
Can someone please confirm to me that when my application is written in .NET
http://developer.android.com/reference/android/app/Notification.html#number Can anyone please confirm if this was removed from ICS (or before)? I
Can someone please confirm that all Kanji characters in Chinese are 3 bytes long
Following some excellent help from this forum, can anyone please confirm if this is
Please can anyone one point me to a good tutorial that helps me to
As the title - please can anyone explain how the next scripts works this
I am trying to create a please confirm page before submitting the data from
I know that this question have been asked several times. But I can't get
Can anyone please confirm for game of life: if inputs - - - -

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.