Show/Hide Elements with jQuery

A show / hide toggle button (raw, and with fade effects) for HTML elements, controlled by jQuery.

by Preston Badeer

HTML

<input id="button" type="button" value="show/hide" />
<div id="meme">allo!</div>

JavaScript

$('#button').click(function(){
    $('#meme').fadeToggle(); //Use toggle() instead of fadeToggle() if you want a raw show/hide with no fade
});