Loading Please Wait...

Logo Lynxsia IT Solutions

jQuery Effects Hide and Show

JQ Effects Show And Hide

jQuery allow us to show, hide, and toggle between the state.

The hide() Methods

The hide() method is used to hide elements.

Syntax
					 
        
          $(selector).hide(speed, callback);
        
      

The optional speed parameter specifies the speed of the hiding, and can take the following values: "slow", "fast", or milliseconds.

The optional callback parameter is a function to be executed after the The hide() method completes.

					 
        
          $(document).ready(function(){
            $("button").click(function(){
              $("p").hide(1000, function(){
                alert("The paragraph is now hidden");
              });
            });
          });
        
      
The show() Methods

The show() method is used to show elements.

Syntax
					 
        
          $(selector).show(speed,callback);
        
      

The optional speed parameter specifies the speed of the showing, and can take the following values: "slow", "fast", or milliseconds.

The optional callback parameter is a function to be executed after the The show() method completes.

					 
        
          $(document).ready(function(){
            $("button").click(function(){
              $("p").show(1000, function(){
                alert("The paragraph is now shown");
              });
            });
          });
        
      
The toggle() Methods

The toggle() method toggle between the hide() and show() methods.

Syntax
					 
        
          $(selector).toggle(speed,callback);
        
      

The optional speed parameter specifies the speed of the showing, and can take the following values: "slow", "fast", or milliseconds.

The optional callback parameter is a function to be executed after the The toggle() method completes.

					 
        
          $(document).ready(function(){
            $("button").click(function(){
              $("p").toggle(1000, function(){
                alert("The paragraph is now toggle");
              });
            });
          });
        
      

How you feel about this blog:

Share this blog on:

Report Us

If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com

Contact Us
Ads
Logo
Lynxsia IT Solutions

We are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..

Kotwali Road, Chhiptehri, Banda, 210001, UP, India

Copyright © 2022, Lynxsia IT Solutions, All rights reserved