Created
August 26, 2010 19:45
-
-
Save anonymous/552091 to your computer and use it in GitHub Desktop.
This file contains hidden or 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({ | |
//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