91-9990449935 0120-4256464 |
jQuery UI switchClassThe jQuery UI switchClass() method is used to move from one CSS class to another CSS class, animating the transition from one state to another state. Syntax: Let's see the basic syntax of jQueryUI swithClass() method: (Added in version 1.0 of jQueryUI) Parameters of switchClass() method: removeClassName: It is a string. It represents the CSS class name or space demarcated list of class names, to be removed. addClassName: It is of type string. It represents one or more class names which are added to the class attribute of each matched element. duration: This is of type number or string and used to specify the time duration in millisecond. Its default value is 400. easing: It specifies the name of the easing function to be passed to the animate() method. complete: It is a callback method called for each element when the effect is completed for this element. Syntax for jQuery switchClass() method: (Added in version 1.9) The new version 1.9 of jQueryUI also supports children option, which will also animate descendant elements. Syntax: Parameters of switchClass() method: (Added in version 1.9) removeClassName: It is a string. It represents the CSS class name or space demarcated list of class names, to be removed. addClassName:It is of type string. It represents one or more class names which are added to the class attribute of each matched element. options: It is used to specify all animation settings. All properties are optional. Its possible values are:
Example of jQuery UI switch class()Let's take an example of jQuery UI switchClass() method: Test it Now
Next TopicjQuery UI Animation
|