Description: Shakes the element multiple times, vertically or horizontally.
-
shake
-
direction (default: "both"
)
The direction of the effect. Possible values: "left"
, "right"
, "up"
, "down"
.
-
distance (default: 20
)
Distance to shake.
-
times (default: 3
)
Times to shake.
Shake a div.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<title>shake demo</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
<p>Click anywhere to shake the box.</p>
$( document ).click(function() {
$( "#toggle" ).effect( "shake" );
|