Skip to main content

All Questions

Tagged with
8698 votes
67 answers
3.2m views

How do I check if an element is hidden in jQuery?

How do I toggle the visibility of an element using .hide(), .show(), or .toggle()? How do I test if an element is visible or hidden?
Philip Morton's user avatar
132 votes
15 answers
139k views

How do I check if an element is really visible with JavaScript? [duplicate]

In JavaScript, how would you check if an element is actually visible? I don't just mean checking the visibility and display attributes. I mean, checking that the element is not visibility: hidden or ...
Macha's user avatar
  • 14.6k
399 votes
6 answers
661k views

Equivalent of jQuery .hide() to set visibility: hidden

In jQuery, there are .hide() and .show() methods which sets the CSS display: none setting. Is there an equivalent function which would set the visibility: hidden setting? I know I can use .css() ...
Tomas's user avatar
  • 58.9k
147 votes
9 answers
619k views

How to make a DIV visible and invisible with JavaScript?

Can you do something like function showDiv() { [DIV].visible = true; //or something }
user avatar
58 votes
7 answers
92k views

jQuery css Visibility with animation

I have few div's placed underneath each other and I'm using css visibility to fade them in and out. The reason why I use visibility is so that the div's don't move place. For fade In I'm using: $('....
jQuerybeast's user avatar
  • 14.4k
8 votes
1 answer
28k views

Add event listener to document opened in new window

Is there anything that prevents me from adding a event listener to the window that results from a window.open() call? I am trying to set a handler function to be triggered on a visibility change event ...
Izabela's user avatar
  • 333
5 votes
2 answers
3k views

Show children of invisible parents

In my scene I have an object graph, where I add child objects to parents. However, when I set parent.visible = false three.js behaves correctly and shows no element in the hierarchy. But for my ...
Jonas's user avatar
  • 1,325
71 votes
5 answers
28k views

Why does jQuery show/hide use display:none instead of visibility:hidden?

display:none means that the element isn't rendered as part of the DOM, so it's not loaded until the display property changes to something else. visibility:hidden loads the element, but does not show ...
isayno's user avatar
  • 755
18 votes
3 answers
140k views

conditional display of html element forms

Well, after a one hour introduction to javascript, I ve come up with the following code. It did what I wanted alright, but then I wanted something else and it wont work. I wanted that upon clicking ...
Alvaro's user avatar
  • 273
5 votes
2 answers
1k views

IE7 table cells made invisible by CSS cannot be made visible by later class changes (??)

Here are two test files: http://gutfullofbeer.net/good-table.html http://gutfullofbeer.net/bad-table.html The markup on those two page is all almost the same. There's a table with two columns. The &...
Pointy's user avatar
  • 411k
5 votes
3 answers
7k views

How to hide a Div when the scroll bar is moving with jQuery?

I just want the #menu to fade when the scroll bar is moving to provide a less cluttered interface. Is there code that would allow this? I guess basically what I'm looking for is how to grab the ...
Mohammad's user avatar
  • 7,402
3 votes
4 answers
25k views

Javascript toggle visibility multiple divs

http://blog.movalog.com/a/javascript-toggle-visibility/ this is a page with some code and a script im using in my site for an image gallery, however when trying to toggle the visibility of multiple ...
user2072017's user avatar
27 votes
13 answers
54k views

How can I check that an element is visible with Puppeteer and pure JavaScript?

I wish to check that a DOM element is visible with Puppeteer and pure JavaScript (not jQuery), how can I do this? By visible I mean that the element is displayed through CSS, and not hidden (f.ex. by ...
aknuds1's user avatar
  • 67.4k
23 votes
6 answers
78k views

Initially hiding a div for later display

My web page is like the following: <div id="id1" class="stuff"> TEXT, FORMS, and STUFF </div> <div id="id2" class="stuff" style="display:none"> TEXT, FORMS, and STUFF </div> ...
user974896's user avatar
  • 1,803
22 votes
3 answers
176k views

document.getElementById("remember").visibility = "hidden"; not working on a checkbox

I cannot get the visibility or display properties to work. Here is the HTML footer: <div id="footer"> &copy; <strong id="foot" onmouseover="showData();" onmouseout = "hideData()"&...
Ben's user avatar
  • 2,212

15 30 50 per page