jQuery toggle()
With jQuery, you can toggle between the hide() and show() methods with the toggle() method.Shown elements are hidden and hidden elements are shown:
Example
$("button").click(function(){
$("p").toggle();
});
$("button").click(function(){
$("p").toggle();
});