Monday, September 18, 2023
HomeCSSjavascript - Exactly how to Make SideNav close Outdoors Click

javascript – Exactly how to Make SideNav close Outdoors Click


Im Attempting to make this Sidenav Close when You Click beyond it.

 begin {
size: 0px;
setting: repaired;
z-index: 1;
elevation: 350px;
left: 0px;
top: 65px;
overflow: concealed;
change: 0s;
background-color: rgba( 4, 4, 7, 0.87);.
}

<< a href=" #" onclick=" myFunction()"><> < img src=" images/icon-start. png" size=" 200" elevation=" 64" alt="" boundary=" 0" onmouseover=" this.src=" https://stackoverflow.com/questions/76872555/images/icon-start-hover.png"" onmouseout=" this.src=" images/icon-start. png""><>  < div id=" mystart" course=" beginning">
<> < br>>.
<< table size=" 80%" boundary=" 0" line up=" facility" cellpadding=" 3" cellspacing=" 5">
<> < tbody>>.
<< tr>>.
<< td design=" text-align: facility"><> < switch course=" start-buttons" id=" update12">> FRONTPAGE<  .
<< tr>>.
<< td design=" text-align: facility"><> < switch course=" start-buttons" id=" update11">> DOWNLOADS<  .
<< tr>>.
<< td design=" text-align: facility"><> < switch course=" start-buttons" id=" update10">> WEB LINK<  .
<< tr>>.
<< td design=" text-align: facility"><> < switch course=" start-buttons" id=" update7">> CONSOLE SONGS< .
<.
<< tr>>.
<< td design=" text-align: facility"><> < switch course=" start-buttons" id=" update9">> ITEMS 4 SALE< .
<.
<< tr>>.
<< td design=" text-align: facility"><> < switch course=" start-buttons" id=" update8">> GET IN TOUCH WITH<  .
<.
<.
<.

var clicked = 0;.

feature myFunction() {
if (clicked == 0) {
document.getElementById(" mystart"). style.width="333px";.
clicked = 1;.
} else {
document.getElementById(" mystart"). style.width="0";.
clicked = 0;.
}
}

Im Attempting to make this Sidenav Close when You Click beyond it. This is what i have actually attempted until now.
Im Attempting to make this Sidenav Close when You Click beyond it. This is what i have actually attempted until now.

RELATED ARTICLES

Most Popular

Recent Comments