Answers for "make div closable"

0

make div closable

<!-- In HTML: -->
<div class="ShowHide" id="Bar">
  <div id="right">
    <a href="#" onclick="Hide(Bar);">X</a>
  </div>
  <div id="left">
    Closable Div - For example, an announcement bar.
  </div>
</div>

<!-- In Javascript: -->
function Hide(HideID) {
  HideID.style.display = "none"; 
}
Posted by: Guest on August-11-2021

Browse Popular Code Answers by Language