Demo of Mouseup Behavior

Fade & Close on Mouseup

Here's an example that fades & closes the image on the left when the user releases the mouse on the avatar (different than a click which is a mousedown + mouseup). The protoscript below says: for an element with id set to avatar, fade it out when the user releases the mouse on it and then close it when the fade completes. You can click here to restart the example.

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

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