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 19 more by this user. Created: 01/25/11
Last CDN Push: 01/26/11
Build Tag: gallery-2011.01.26-20-33
Project: YUI 3
License: YUI BSD
YUI Version: 3.3.0
Free for use.
This patch corrects a bug in YUI 3.3.0's Y.delegate and node.delegate methods that caused the use of a detach category to result in no subscription being made. delegate('cat|click',...) would do nothing.
This patch module is only necessary for version 3.3.0.
See ticket http://yuilibrary.com/projects/yui3/ticket/2529827 for full details.
Apply the patch in the use() statement as long as version 3.3.0 is in use. Remove from the use() statement after upgrading to the subsequent version.
This patch is also applicable to simpleYUI use cases.
<script src="http://yui.yahooapis.com/3.3.0/build/yui/yui-min.js"></script>
YUI({
//Last Gallery Build of this module
gallery: 'gallery-2011.01.26-20-33'
}).use('node-event-delegate', 'gallery-patch-330-delegate-cat', function (Y) {
Y.one('#container').delegate("foo|click", callback, ".bar");
Y.delegate("foo|click", callback, "#container", ".bar");
});
// Or with simpleYUI
// version #1, include the script on the page via combo
// <script src="http://yui.yahooapis.com/combo?3.3.0/build/simpleyui/simpleyui-min.js&....gallery-patch-330-delegate-cat.js"></script>
// <script>
Y.use('gallery-patch-330-delegate-cat');
Y.one('#container').delegate("foo|click", callback, ".bar");
Y.delegate("foo|click", callback, "#container", ".bar");
// version #2, include the patch script as a separate <script>
// <script src="http://yui.yahooapis.com/3.3.0/build/simpleyui/simpleyui-min.js"></script>
// <script src="http://yui.yahooapis.com/.....gallery-patch-330-delegate-cat.js"></script>
Y.use('gallery-patch-330-delegate-cat');
Y.one('#container').delegate("foo|click", callback, ".bar");
Y.delegate("foo|click", callback, "#container", ".bar");
// version #3, don't include the patch script on the page, and wrap calling code in a Y.use() callback
Y.use('gallery-patch-330-delegate-cat', function () {
Y.one('#container').delegate("foo|click", callback, ".bar");
Y.delegate("foo|click", callback, "#container", ".bar");
});
All code on this site is licensed under the BSD License unless stated otherwise.