jQuery UI framework provides effect() method for managing different variety of visual effects on the selected elements without using show() and hide() methods. There are many types of effects which are passed as a parameter to the effect() method.
$(selector).effect(effectType[, options ] [, duration ] [, complete ]);
Parameters: This method accepts four parameters as mentioned above and described below:
- effectType: The type of effect which is chosen for the visual transition of the selected element.
- options: The options or settings are used for easing effects.
- duration: The time or duration in milliseonds used for the animation effect to run. The default value is 400ms.
- complete: This is the callback function which is executed when the visual effect is completed.
Links for jQuery UI:
There are many variety of effectType which can be passed to the effect() method as per the project requirements. In the following example, we will be only demonstrating some of them along with output images.
Example 1: The following example demonstrates jQuery UI effect() method with shake effect with options settings as time and distance.
Example 2: The following code demonstrates jQuery UI effect() method with explode effect with easing setting as “swing”.
Example 3: The following example demonstrates the effect() method with bounce effect type.
- jQuery | Effect fadeOut() Method
- jQuery | Effect show() Method
- How to create slide left and right toggle effect using jQuery?
- How to use Explode effect in jQuery ?
- How to create followspot effect using HTML CSS and jQuery ?
- jQuery | jQuery.fx.interval Property with example
- jQuery | jQuery.fx.off Property
- jQuery | jQuery.support Property
- jQuery | jquery Property
- Parallax scrolling effect using CSS.
- How to create Glowing Star effect using HTML and CSS?
- Double Layered Text Effect using CSS
- CSS | Shadow Effect
- CSS Rain and lightning effect
- How to create fade-in effect on page load using CSS ?
- How to disable a CSS :hover effect?
- How to add a pressed effect on button click in CSS?
- How to Create Paradoxical Effect using CSS ?
- How to create a Ripple Effect on Click the Button ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.