Skip to content

Instantly share code, notes, and snippets.

Created August 26, 2010 19:45
Show Gist options
  • Save anonymous/552091 to your computer and use it in GitHub Desktop.
Save anonymous/552091 to your computer and use it in GitHub Desktop.
YUI({
//Last Gallery Build of this module
gallery: 'gallery-2010.08.04-19-46'
}).use('node', 'overlay', 'widget-anim', 'gallery-overlay-extras', function(Y){
Y.on('domready', function(){
var overlay = new Y.Overlay({
bodyContent : '<p>I am an Overlay</p>',
footerContent : '<button id="close">Close</button>',
width : '400px',
height : '200px',
zIndex : 100,
centered : true,
constrain : true,
render : true,
visible : false,
plugins : [
{ fn: Y.Plugin.OverlayModal },
{ fn: Y.Plugin.OverlayKeepaligned },
{ fn: Y.Plugin.OverlayAutohide, cfg: {
focusedOutside : false // disables the Overlay from auto-hiding on losing focus
}}
],
});
Y.one('.flv_video').on('click', Y.bind(overlay.show, overlay))
Y.one('#close').on('click', Y.bind(overlay.hide, overlay))
Y.delegate('click', function(e){
e.preventDefault();
Y.bind(overlay.show, overlay);
}, '#page_content_columns', '.case-study a.flv_video');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment