Walter Rumsby![]()
Node Plugin for working with FullScreen based on the W3C Proposal and John Dyer's jQuery Plugin.
<script src="http://yui.yahooapis.com/3.5.0/build/yui/yui-min.js"></script>YUI({
//Last Gallery Build of this module
gallery: 'gallery-2012.05.02-20-10'
}).use('gallery-full-screen', 'gallery-node-full-screen', 'event-base', 'node-base', function(Y) {
'use strict';
var status = Y.one('#status'),
button = Y.one('#button'),
node = Y.one('#node');
if (!Y.FullScreen.isSupported()) {
status.set('text', 'SORRY: Your browser does not support FullScreen');
return;
}
button.removeAttribute('disabled');
status.set('text', 'YES: Your browser supports FullScreen');
node.plug(Y.Plugin.NodeFullScreen);
button.on('click', function(e) {
node.fullScreen.request();
});
Y.on('fullScreen:change', function(e) {
if (Y.FullScreen.isEnabled()) {
status.set('text', 'Whoa, you went fullscreen');
button.setAttribute('disabled', 'disabled');
} else {
status.set('text', 'Back to normal');
button.removeAttribute('disabled');
}
});
});
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info