The accordion includes a selection of methods that allow you to control and manipulate the behavior of the widget programmatically. Some of the methods are common to each component of the library, such as the
destroy method that is used by every widget. The following table lists the single unique method for the accordion widget:
Programmatically activate a header. This is analogous to the header being selected by the visitor.
Remember, in addition to the accordion-specific
activate method, the
option methods are also available. We looked at the
disable methods in the last chapter, so we won't go over those again.
destroy method is one of the common methods exposed by all library components. This method removes the widget class names and returns the underlying markup to its original state. We'll use the default options associated with accordion instead of the ones we configured for the last example...