Answers for "hide div on click javascript"

0

hide div on button click javascript

<style>
	function hideDiv(){
		var closedDiv  = document.getElementById("closableDiv");
		closedDiv.style.display = "none";
	}
</style>
<button id="closableDiv" onClick="hideDiv()"> </button>
Posted by: Guest on July-13-2021
7

js hide div

//If you have jquery, you can use the following method:
$("#mydiv").hide(); //hides div.
$("#mydiv").show(); //shows div.
//If you don't have jquery...
//search up the following: html how to add jquery
Posted by: Guest on June-22-2020
3

how to hide div in html

document.getElementById('elementName').hide();
Posted by: Guest on November-09-2019
0

onclick hide div javascript

<script type="text/javascript">
function hide(id) {
	document.getElementById(id).style.display = "none";
}
function show(id) {
	document.getElementById(id).style.display = "";
}
</script>
<div id="div" onclick="hide('div')">
  <p>Click to hide!</p>
</div>
Posted by: Guest on July-16-2021

Code answers related to "hide div on click javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language