Demo of DblClick Behavior

On Double-Click, Fade & Close

Here's an example that fades & closes the image on the left when the user double-clicks on it. (It's live, so go ahead and try it!). The protoscript below says: for an element with id set to avatar, fade it out when the user double-clicks on it and close it when the fade completes. You can click here to restart the example.

$proto('#avatar', {
  Click: {
    onClick: {
      Fade: {
        opacity: {to: 0},
        onComplete: {Close : {} }
      }
    }
  }
});

For a full description of this behavior see the DblClick Documentation Page.