| Page 1 of 1 | [ 2 posts ] |
|
Hi,
I've inherited some legacy code written in jquery that is creating some custom events. The new code is written in yui3 and I now need to listen for these legacy custom events. Is this possible using the yui custom event system? Thanks in advance |
Juan Ignacio DopazoYUI Contributor
|
No, jQuery isn't compatible with YUI that way. You can, while you migrate your code, listen to jQuery events with jQuery and do actions in YUI from those event listeners:
Code: jQuery('#foo').on('custom', function () { Y.one('#bar').addClass('baz'); }); In YUI you rarely fire custom events from a Node. Most of the time you use plugins or widgets for this. Sometimes you might want to fire a "global" event by doing Y.fire('custom'), but that is usually used for events relevant to the whole document. |
| Page 1 of 1 | [ 2 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 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
Powered by phpBB® Forum Software © phpBB Group