Caridy Patino![]()
Binding user actions until a particular YUI instance become ready, and the listeners defined before flushing those events through a queue. This will help to catch some early user interactions due the ondemand nature of YUI 3.
Make sure you read this article to fully understand how this component works:
http://www.yuiblog.com/blog/2010/06/23/event-binder/
Check the latest changes in this module.
Catching early actions using a simple configuration. Then setting a real listener and flushing the events. Here is the original source code for this example:
http://caridy.github.com/examples/gallery-event-binder/simple.html
Check more examples here:
http://caridy.github.com/examples/gallery-event-binder/index.html
<script src="http://yui.yahooapis.com/3.2.0/build/yui/yui-min.js"></script>YUI({
//Last Gallery Build of this module
gallery: 'gallery-2010.06.30-19-54'
}).use('gallery-event-binder', function(Y) {
Y.on('click', function(e) {
// do your stuff here
}, '#mylink');
Y.EventBinder.flush('click');
});| Subject | Author | Date |
|---|---|---|
| loading and then initialization | Marc | 11/28/12 |
© 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