Shake effect using Jquery UI
Here we have given "shake " as effect. All other parameters are optional
Number of times the element should shake, default value is 3
Distance in pixel the element has to travel , default value is 20
It can take these values , default is 'left'. For the direction left and right the movement will be horizontal only but the first step of sake will change. Similarly for up direction the first step will go up in vertical movement. ( watch the DEMO )
callback function: (Optional)
We can use a callback function to execute once the shake effect is over
It can take these values
time in millseconds
Usually it is connected to Click event of a button, here button id is b1
We can add optional parameter times to manage number of time the effect should happen.
Similarly we can add distance in pixels
WE can add callback function to this, the function will display an alert window with message once the shake effect is over.
Here is the code with all optional values
This article is written by plus2net.com team.