jQuery: Making DIV invisible (display:none)
Question by Guest | 2014-06-08 at 17:31
I would like to hide one of my DIV containers on my website with the help of JavaScript (jQuery). In other words, I would like to set the CSS property "display" to the value "none". Is there any code available for this purpose?
Related Topics
jQuery: Show or hide DIV-Container depending on Checkbox State
Tutorial | 0 Comments
JavaScript: Show and hide HTML area by clicking a link
Tutorial | 0 Comments
jQuery: Show a DIV - Hide other DIVs
Tutorial | 0 Comments
jQuery: Show and hide elements
Tutorial | 0 Comments
Darken Background of a Website (Gray Out Effect)
Tutorial | 0 Comments
jQuery: Load and Replace DIV Content with clicking Links
Tutorial | 0 Comments
jQuery: Make Full DIV Container Clickable
Question | 3 Answers
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
Spontaneously, I can think of two possibilities.
Here is my DIV in HTML code with the ID "mydiv":
And here is the first way:
Alternatively, using the second way, you can directly set the CSS:
By the way: Using .show() you can make your DIV visible again and with .toggle() you are able to switch between visible and invisible with each call of the function.
2014-06-08 at 19:12