YouTip LogoYouTip

Api Removeclass

# jQuery UI API - .removeClass() ## Category (#) | (#) | (#) ## Usage **Description:** Removes specified classes from each of the matched elements when animated style changes. **Returns:** (http://api.jquery.com/Types/#jQuery) .removeClass( className [, duration ] [, easing ] [, complete ] ) | Parameter | Type | Description | Default | | --- | --- | --- | --- | | className | String | One or more class names to be removed from the class attribute of each matched element, separated by spaces. | | | duration | Number or String | A string or a number determining how long the animation will run. | 400 | | easing | String | A string indicating which (#) function to use. | swing | | complete | Function() | A function to call once the animation is complete. | | .removeClass( className [, options ] ) | Parameter | Type | Description | | --- | --- | --- | | className | String | One or more class names to be removed from the class attribute of each matched element, separated by spaces. | | options | Object | All animation settings. All properties are optional. * **duration** (default: `400`) Type: Number or String Description: A string or a number determining how long the animation will run. * **easing** (default: `swing`) Type: String Description: A string indicating which (#) function to use. * **complete** Type: Function() Description: A function to call once the animation is complete. * **children** (default: `false`) Type: Boolean Description: Whether the animation should be applied to all descendants of the matched elements. This feature should be used with caution, as determining whether an element is a descendant of an animation is costly and grows linearly with the number of descendants. * **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 can also accept a string, in which case the animation is added to the queue represented by that string. | Similar to native CSS transitions, jQuery UI's class animations provide a smooth transition from one state to another while ensuring all style changes are handled via CSS, without the need for JavaScript. All class animation methods, including `.removeClass()`, allow for custom animation durations and (#) functions, and also provide a callback upon animation completion. Not all styles can be animated. For example, animating background images. Any style that cannot be animated will change at the end of the animation. This plugin extends jQuery's built-in [.removeClass()](#) method. If jQuery UI is not loaded, calling the `.removeClass()` method will not fail directly because the method exists in jQuery. However, the expected behavior will not occur. ## Example Remove the class "big-blue" from the matched elements. .removeClass() Demo div { width: 100px; height: 100px; background-color: #ccc; } .big-blue { width: 200px; height: 200px; background-color: #00f; }
$( "div" ).click(function() { $( this ).removeClass( "big-blue", 1000, "easeInBack" );}); (#) [](#)[jQuery UI API – Pulsate Effect](#) [jQuery UI API – Scale Effect](#)[](#) [Volcengine Coding Plan supports Doubao, GLM, DeepSeek, Kimi, MiniMax and other mainstream large models, officially supplied, stable and reliable. Configuration Guide Β₯9.9/ month Subscribe Now](https://maas.xfyun.cn/modelSquare?ch=maas_lm_l2E)
← Api Scale EffectApi Pulsate Effect β†’