Software > jQuery plugin: switchClass

jQuery switchClass - 1.0

Overview

This VERY simple plugin provides functionality similar to jQuery's built in toggleClass() function, but instead of adding/removing a single class from an element, switchClass toggles between TWO classes ensuring that one and only one of the two classes is assigned to an element (or elements) at one time. It leaves all other element classes untouched and only affects the two classes specified.

Example

Click here for an example.

Download