JqueryUI Remove Class - JqueryUI

How to use Remove class method in jqueryUI ?

The removeClass() method, which is one way to manage the visual effects of jQueryUI. The removeClass() method removes the applied class from the element.

The removeClass () method animates changes of all styles, and deletes the specified class to the matching element.

Syntax

Added In Version 1.0 of jQueryUI

The removeClass() method has its basic syntax as follows:

Sr.No. Parameter & Description
1
className
This is a String containing one or more CSS classes (separated by spaces) to be removed.
2
duration
This is of type Number or String, and indicates the number of milliseconds of the effect. A value of 0 takes the element directly in the new style, without progress. Its default value is400.
3
easing
This is of type String and indicates the way to progress in the effect. Its default value isswing. Possible values arehere.
4
complete
This is a callback method called for each element when the effect is complete for this element.
Added In Version 1.9 of jQueryUI

In version 1.9, this method also supports the children option, and descendant elements are also animated.

Sr.No. Parameter & Description
1
className
This is a String containing one or more CSS classes (separated by spaces).
2
options
This represents all animation settings. All properties are optional. Possible values are −
  • duration− This is of type Number or String, and indicates the number of milliseconds of the effect. A value of 0 takes the element directly in the new style, without progress. Its default value is400.
  • easing− This is of type String and indicates the way to progress in the effect. Its default value isswing. Possible values arehere.
  • complete− This is a callback method called for each element when the effect is complete for this element.
  • children− This is of type Boolean and represents whether the animation should additionally be applied to all descendants of the matched elements. Its default value isfalse.
  • queue− This is of type Boolean or String and represents whether to place the animation in the effects queue. Its default value istrue.

Examples

The following example demonstrates the use of removeClass() methods.

Passing single class

Save the above code in the HTML file removeclassexample.htm and open it with a standard browser supporting javascript. You also need to display the following output:


When you click the Add class button and Delete class button, the effect of the class is displayed in the box.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

JqueryUI Topics