jQuery Show and Hide Example 

First piece of jQuery I learned were these functions and I have never not used them on a project. These functions I believe are one of the first snippets of jQuery any developer should learn.

In the example I have assigned the show and hide functions to a ID of a HTML element and when the element is clicked the functions will run.

1
2
3
$("#hide").click(function(){
$("p").hide();
});

$(“#show”).click(function(){
$(“p”).show();
});

For a step up from the show and hide function there is the .toggle function. This switches between show and hide.

1
$("p").toggle();