jQuery Hide Show Effect

jQuery used to provide a various kind of effects like Hide, Show, Slide, Fade, Animate and toggle effects.

jQuery hide() method hide the matched elements. and jQuery show() method display the matched elements.


$(selector).show();        // This syntax does not accept any arguments.
$(selector).show( [duration], [callback] );
$(selector).hide();        // This syntax does not accept any arguments.
$(selector).hide( [duration], [callback] );


  • duration default: 400 Accept string or number that determining how long animation will run. For example predefined duration ("slow", "normal", "fast"), or number of milliseconds to run the animation (3000, 1000).

  • Example. "slow", "normal", "fast", 3000 (milliseconds), 1000 (milliseconds).

  • callback Optional. A function to call once the animation is complete.


<!DOCTYPE html>
  <title>jQuery hide() show() function</title>
  <script src="jquery-latest.min.js"></script>
    $(document).ready(function() {
      $("#show").click(function () {
      $("#hide").click(function () {
  <button id="show">Show</button> 
  <button id="hide">Hide</button> 
  <p style="background-color:#99FFFF;font-size:16px;font-family:Verdana;">Paragraph will hide after click</p>

Run it...   »

Example Result :

Here are all jQuery effects references, see all jQuery effects references.