onclick hide div javascript
<script type="text/javascript">
function hide(id) {
document.getElementById(id).style.display = "none";
}
function show(id) {
document.getElementById(id).style.display = "";
}
</script>
<div id="div" onclick="hide('div')">
<p>Click to hide!</p>
</div>