Hello I wanna write a javascript function that hides an element/specfic id in my html code once the user clicks on that text. What I have right now isn't hiding the html. I'm not so good at javascript so I appreciate any help
what i have for my html:
<head> <script type="text/javascript" src="hide.js"></script> </head>
<h1 onclick = "hide(this)">[Name]</h1>
What I have for my javascript function:
function hide (el) {
el.style.visibility = "hidden";
}