Skip to content

@ericf /gist:424223
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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
Something went wrong with that request. Please try again.