public
Created

  • Download Gist
gistfile1.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
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 }
]
});
});
});
});

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.