Files
febbweiss.github.io/demo/filebrowser-durandal-widget/lib/jquery/src/event-alias.js
ECAILLE Fabrice (externe) e2277667c5 Fix: add dependencies
2017-05-04 10:26:11 +02:00

16 lines
550 B
JavaScript

jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
"change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
// Handle event binding
jQuery.fn[ name ] = function( data, fn ) {
return arguments.length > 0 ?
this.on( name, null, data, fn ) :
this.trigger( name );
};
});
jQuery.fn.hover = function( fnOver, fnOut ) {
return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
};