Changing the tooltip state
The visual display of the tooltip widget has a default state. That is, out of the box, the widget is nicely designed, using elements from the theme framework. We may want to change that, however, depending on the state of some resource in the application. For example, a button that is new to the user as a result of a change in permissions might want a tooltip state that stands out visually, relative to the other tooltips on the page. By the same token, if there is a broken resource, and the user hovers over one of its components, the tooltip displayed should take on an error state. Of course, when changing the state of the tooltip, we should keep in mind that the state should match the context and tone of the actual tooltip. For example, don't put an error state on a tooltip that reads "everything is good to go!". Let's look at a quick and easy entry point into tooltip customization. We'll use a standard tooltip option to pass the state CSS class in.