YouTip LogoYouTip

Api Hide

# jQuery UI API - .hide() ## Category (#) | (#) | (#) | (#) ## Usage **Description:** Hides matched elements with a custom effect. **Returns:** (http://api.jquery.com/Types/#jQuery) .hide( effect [, options ] [, duration ] [, complete ] ) | Parameter | Type | Description | Default | | --- | --- | --- | --- | | effect | String | A string indicating which (#) to use. | | | options | Object | Effect-specific settings and (#). | | | duration | Number or String | A string or a number determining how long the animation will run. | 400 | | complete | Function() | A function to call once the animation is complete. | | .hide( options ) | Parameter | Type | Description | | --- | --- | --- | | options | Object | All animation settings. The only required property is effect. * **effect** Type: String Description: A string indicating which (#) to use. * **easing** (default: `"swing"`) Type: String Description: A string indicating which (#) function to use. * **duration** (default: `400`) Type: Number or String Description: A string or a number determining how long the animation will run. * **complete** Type: Function() Description: A function to call once the animation is complete. * **queue** (default: `true`) Type: Boolean or String Description: A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. **As of jQuery 1.7**, the queue option also accepts a string, in which case the animation is added to the queue represented by that string. | This plugin extends the jQuery built-in [.hide()](#) method. If jQuery UI is not loaded, calling the `.hide()` method will not directly fail, since the method exists in jQuery. However, the expected behavior will not occur. ## Example Hide a div using the Drop Effect. .hide() Demo div { width: 100px; height: 100px; background: #ccc; border: 1px solid #000; }
$( "button" ).click(function() { $( "div" ).hide( "drop", { direction: "down" }, "slow" );}); (#) [](#)[jQuery UI API – Fold Effect](#) [jQuery UI API – Highlight Effect](#)[](#)
← Api Highlight EffectApi Fold Effect β†’