diff --git a/src/event.js b/src/event.js index 679fa79b6..bfd8b18a8 100644 --- a/src/event.js +++ b/src/event.js @@ -122,6 +122,11 @@ this.dispatchEvent(event); }); }; + + //add support to all events supported with jQuery which are simple wrappers for native events + ("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error").split(" ").forEach(function(e) { + $.fn[e] = function(callback){ return this.bind(e, callback) } + }); $.Event = function(src, props) { var event = document.createEvent('Events');