Style display property is used to hide and show the content of HTML DOM by accessing the DOM element using JavaScript/jQuery.
To hide an element, set the style display property to “none”.
document.getElementById("element").style.display = "none";
To show an element, set the style display property to “block”.
document.getElementById("element").style.display = "block";
- Steps to show the working of style display property:
- Create some div and assign them an id or class and then add styling to it.
<div class= "circle" id= <code class="string" style='margin: 0px !important; padding: 0px !important; border: 0px !important; font-size: 0.99em !important; vertical-align: baseline !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier,
|