YouTip LogoYouTip

Api Shake Effect

# jQuery UI API - Shake Effect ## Category (#) ## Usage **Description:** Shakes an element horizontally or vertically. shake | Parameter | Type | Description | Default | | --- | --- | --- | --- | | direction | String | A value of "left" or "right" will shake the element horizontally, while "up" or "down" will shake it vertically. This value specifies the direction of the first step as the element moves along the axis. | "left" | | distance | Number | The distance to shake. | 20 | | times | Integer | The number of times to shake. | 3 | ## Example Shake a div. Shake Effect Demo #toggle { width: 100px; height: 100px; background: #ccc; }

Click anywhere to shake.

$( document ).click(function() { $( "#toggle" ).effect( "shake" );}); (#)
← Api ShowApi Scale Effect β†’