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>
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>
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
how to make hide/show btn in js
let btnName = document.getElementById('btnId');
btnName.addEventListener('click', ()=>{
let element = document.getElementById('elementId');
if (element.style.display != 'inline'){
element.style.display = 'inline';
}
else{
element.style.display = 'none'
}
})
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us