jQuery hide div

This example hides a visible div element using the jquery hide method.

Now you see it!

Code


<script>
function gofunc() {
$( "#hiddenDiv" ).hide();
}
</script>
<p><button type="button" onclick="gofunc()" >hide the div!</button></p>
<div id="hiddenDiv" >
<p>Now you see it!</p>
</div>