make div closable

Solutions on MaxInterview for make div closable by the best coders in the world

showing results for - "make div closable"
Selena
09 Jan 2019
1<!-- In HTML: -->
2<div class="ShowHide" id="Bar">
3  <div id="right">
4    <a href="#" onclick="Hide(Bar);">X</a>
5  </div>
6  <div id="left">
7    Closable Div - For example, an announcement bar.
8  </div>
9</div>
10
11<!-- In Javascript: -->
12function Hide(HideID) {
13  HideID.style.display = "none"; 
14}