Effects in jQuery
jQuery provides a simple interface to perform different types of amazing effects. JQuery methods allow us to quickly apply common effects with minimal configuration. This tutorial will cover all the important jQuery methods for creating Visual Effects.
jQuery provides a simple interface to perform different types of amazing effects. JQuery methods allow us to quickly apply common effects with minimal configuration.
This tutorial will cover all the important jQuery methods for creating Visual Effects.
Show and hide elements in jQuery
If you're expecting short commands to show and hide elements in jQuery, you'll be disappointed. It is really simple and easy to ask.show () to display elements in a wrapped set (wrapped / wrapped) and hide () to hide them.
Show syntax ()
The following is a simple syntax for the show method () in jQuery:
[selector]. show( speed, [callback] );
Detailed description of the parameters:
- speed - A string representing one of the three predetermined speeds ("slow", "normal", or "fast") or milliseconds to run the effect (eg 1000).
- callback - this optional parameter represents a function to be executed whenever the effect completes; execute once for each effect.
Syntax hide ()
This is a simple syntax for hide () method in jQuery:
[selector]. hide( speed, [callback] );
Detailed description of the parameters:
- speed - A string representing one of the three predetermined speeds ("slow", "normal", or "fast") or milliseconds to run the effect (eg 1000).
- callback - this optional parameter represents a function to be executed whenever the effect completes; execute once for each effect.
For example
You consider the following HTML file with a small jQuery code:
The jQuery Example