Created
June 3, 2010 17:53
-
-
Save ericf/424223 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YUI().use('node', function(Y){ | |
Y.one('#foo').on('click', function(e){ | |
// Lazy-use OverlayModal. | |
// Create and show a new modal Overlay. | |
Y.use('gallery-overlay-modal', function(){ | |
var myModalOverlay = new Y.Overlay({ | |
bodyContent : '<p>I am modal!</p>', | |
width : '300px', | |
height : '150px', | |
zIndex : 100, | |
render : true, | |
plugins : [{ fn: Y.Plugin.OverlayModal }] | |
}); | |
}); | |
}); | |
Y.one('#bar').on('click', function(e){ | |
// Lazy-use OverlayExtras. | |
// Create and show a new modal Overlay with autohide. | |
Y.use('gallery-overlay-extras', function(){ | |
var myModalAutohidingOverlay = new Y.Overlay({ | |
bodyContent : '<p>I am modal and autohide!</p>', | |
width : '300px', | |
height : '150px', | |
zIndex : 100, | |
render : true, | |
plugins : [ | |
{ fn: Y.Plugin.OverlayModal }, | |
{ fn: Y.Plugin.OverlayAutohide } | |
] | |
}); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment