Home

# Class goog.ui.Zippy

Zippy widget. Expandable/collapsible container, clicking the header toggles the visibility of the content.

extends goog.events.EventTarget

Instance Method Summary
| `collapse()` Collapses content pane.
| `dispatchActionEvent_()` Dispatch an ACTION event whenever there is user interaction with the header. Please note that after the zippy state change is completed a TOGGLE event will be dispatched. However, the TOGGLE event is dispatch on every toggle, including programmatic call to {@code #toggle}.

`disposeInternal()`

Unattach listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners, it should be something like this:

    MyClass.prototype.disposeInternal = function() {
    MyClass.superClass_.disposeInternal.call(this);
    // Dispose logic for MyClass
    };

| `enableKeyboardEventsHandling_(?Element header)` Enables keyboard events handling for the passed header element.
| `enableMouseEventsHandling_(?Element header)` Enables mouse events handling for the passed header element.
| `expand()` Expands content pane.
| `getAriaRole() ⇒ ?goog.dom.a11y.Role`
| `getContentElement() ⇒ ?Element`
| `getVisibleHeaderElement() ⇒ ?Element`
| `isExpanded() ⇒ boolean`
| `isHandleKeyEvents() ⇒ boolean`
| `isHandleMouseEvents() ⇒ boolean`
| `onHeaderClick_(?goog.events.BrowserEvent event)` Click event handler for header element.
| `onHeaderKeyDown_(?goog.events.BrowserEvent event)` KeyDown event handler for header element. Enter and space toggles expanded state.
| `setExpanded(boolean expanded)` Sets expanded state.
| `setExpandedInternal(boolean expanded)` Sets expanded internal state.
| `setHandleKeyboardEvents(boolean enable)` Sets whether the Zippy handles it's own keyboard events.
| `setHandleMouseEvents(boolean enable)` Sets whether the Zippy handles it's own mouse events.
| `toggle()` Toggles expanded state.
| `updateHeaderClassName(boolean expanded)` Updates the header element's className and ARIA (accessibility) EXPANDED state.