Personal tools
Views

From ProtoScript

Jump to: navigation, search

Contents

YUI:Open Behavior

Opens the element or elements within the flow of the page... effectively opening the element or elements. Opposite of the Close Behavior.

Example

$proto('img#avatar', {
  Click: {
     onClick: {
        Open: {}
     }
  },
});

When the user clicks on the avatar (an image with ID='avatar'), changes it's display to 'block' (causing it to open -- if it was closed before).

Attributes

Name Description Default Valid Values Example
target Selected element or elements to open. No value. If no value supplied, use the last targeted element. If value is supplied, use the element(s) selected by the target instead. See Element Scope String value denoting an interface element. See Selecting Elements Close: {}

Callbacks

Name Description
onOpen The callback corresponding to the Open behavior. Fired after the element has been opened.

Demos

See Open Demo