Click anywhere to toggle.
$( document ).click(function() { $( "#toggle" ).toggle( "bounce", { times: 3 }, "slow" );}); (#)Api Bounce Effect
# jQuery UI API - Bounce Effect
## Category
(#)
## Usage
**Description:** The Bounce Effect bounces an element. When used with hide or show, the last or first bounce will have a fade-in/fade-out effect.
bounce
| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| distance | Number | The maximum bounce distance in pixels. | 20 |
| times | Integer | The number of times the element bounces. When hiding or showing, an extra half bounce is added for the fade-in/fade-out effect. | 5 |
## Example
Toggle a div using the Bounce Effect.
Bounce Effect Demo #toggle { width: 100px; height: 100px; background: #ccc; }
YouTip