1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/bower_components/jquery/src/event/alias.js

30 lines
649 B
JavaScript
Raw Normal View History

2016-01-09 13:36:35 -05:00
define( [
2015-06-26 11:53:49 -04:00
"../core",
2016-01-09 13:36:35 -05:00
"../event",
"./trigger"
2015-06-26 11:53:49 -04:00
], function( jQuery ) {
2016-06-11 11:55:39 -04:00
"use strict";
jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
2015-06-26 11:53:49 -04:00
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
2016-06-11 11:55:39 -04:00
"change select submit keydown keypress keyup contextmenu" ).split( " " ),
2016-01-09 13:36:35 -05:00
function( i, name ) {
2015-06-26 11:53:49 -04:00
// Handle event binding
jQuery.fn[ name ] = function( data, fn ) {
return arguments.length > 0 ?
this.on( name, null, data, fn ) :
this.trigger( name );
};
2016-01-09 13:36:35 -05:00
} );
2015-06-26 11:53:49 -04:00
2016-01-09 13:36:35 -05:00
jQuery.fn.extend( {
2015-06-26 11:53:49 -04:00
hover: function( fnOver, fnOut ) {
return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
}
2016-01-09 13:36:35 -05:00
} );
2015-06-26 11:53:49 -04:00
2016-01-09 13:36:35 -05:00
} );