Plato on Github
Report Home
src/event/alias.js
Maintainability
83.74
Lines of code
29
Difficulty
9.60
Estimated Errors
0.15
Function weight
By Complexity
By SLOC
define( [ "../core", "../event", "./trigger" ], function( jQuery ) { "use strict"; jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup 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.extend( { hover: function( fnOver, fnOut ) { return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); } } ); } );