The Gallery is deprecated. No new Gallery components may be submitted, and modifying existing components is disabled. For more information please read the Gallery Deprecation blog post. This is a static snapshot of the Gallery for archive purposes.
See 7 more by this user. Created: 10/30/12
Last CDN Push: 12/5/12
Build Tag: gallery-2012.12.05-21-01
Project: YUI 3
License: YUI BSD
YUI Version: 3.7.3
Free for use.
Busy generates a Busy overlay. You can specify page wide events to turn it on.
In order to use Busy you specify
In order to turn it back off, fire an event: "msa-busy:hide": Y.Global.fire("msa-busy:hide");
You can also fire an event Y.Global.fire("msa-busy:show") to activate the busy overlay for the globalNode
In this version we use the new tap-event as opposed to the click event. So on older versions of YUI, it will not work.
Based on Gallery Busy Overlay.
container: the container where we should listen for busy events
selector: the selector for those elements that when clicked open the busy overlay
css: an optional value for the css name of the busy overlay
globalNode: optional default target container for the overlay
data-busy: attribute on the selector node that contains a selector for the box that should contain the busy overlay
<script src="http://yui.yahooapis.com/3.7.3/build/yui/yui-min.js"></script>
YUI({
//Last Gallery Build of this module
gallery: 'gallery-2012.12.05-21-01'
}).use('gallery-busy', function(Y) {
new Y.MSA.Busy({
container:'body',
selector:'.show',
globalNode:'body'
});
Y.one('#hide').on('click',function(){
Y.Global.fire('msa-busy:hide');
});
});
<div class="busyTop" style="border:1px solid silver;">
text <br/>
more text<br/>
</div>
<a href="javascript:void(0);" class="show" data-busy="div.busyTop">Show busy top container</a> | <a href="javascript:void(0);" id="hide">Hide busy</a> <br/><br/>
All code on this site is licensed under the BSD License unless stated otherwise.