Skip to content

Instantly share code, notes, and snippets.

@carlosrojaso
Created May 15, 2014 21:14
Show Gist options
  • Save carlosrojaso/941b8b43e8f8cc9c185b to your computer and use it in GitHub Desktop.
Save carlosrojaso/941b8b43e8f8cc9c185b to your computer and use it in GitHub Desktop.
JQ Showing and Hiding Content
// Instantaneously hide all paragraphs
$( "p" ).hide();
// Instantaneously show all divs that have the hidden style class
$( "div.hidden" ).show();
// Slowly hide all paragraphs
$( "p" ).hide( "slow" );
// Quickly show all divs that have the hidden style class
$( "div.hidden" ).show( "fast" );
// Hide all paragraphs over half a second
$( "p" ).hide( 500 );
// Show all divs that have the hidden style class over 1.25 seconds
$( "div.hidden" ).show( 1250 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment