display div javascript code example
Example 1: javascript display block
document.getElementById("someElementId").style.display = "block";
Example 2: javascript show div
' Toggles hide / show
function myFunction(div_id) {
var x = document.getElementById(div_id);
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
}
Example 3: how to hide div in html
document.getElementById('elementName').hide();