jQuery UI Shake Effect
In this article, we are going to show the effect of shake using jQuery UI, all the content will go to and from when the action button is clicked which actually triggers the shake effect script.
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.
$( ".selector" ).effect( selectedEffect, options, time(in ms), callback );
- selectedEffect: Effect selected given in jQuery UI.
- options: Added for certain functionality (optional)
- time: Time to complete the effect in microseconds.
- callback: Added for certain functionality (optional)
Return value: It will not return anything.
Scripts added : Please download the library for including pre-compiled files or use the paths for the given script below.
<link rel=”stylesheet” href=”//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css”>
Example: In this example, we are going to show the shake effect using jQueryUI. We will trigger the script using a button.