Mercurial > nebulaweb3
comparison default/node_modules/jquery/src/event/alias.js @ 0:1d038bc9b3d2 default tip
Up:default
author | Liny <dev@neowd.com> |
---|---|
date | Sat, 31 May 2025 09:21:51 +0800 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:1d038bc9b3d2 |
---|---|
1 define( [ | |
2 "../core", | |
3 | |
4 "../event", | |
5 "./trigger" | |
6 ], function( jQuery ) { | |
7 | |
8 "use strict"; | |
9 | |
10 jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + | |
11 "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + | |
12 "change select submit keydown keypress keyup contextmenu" ).split( " " ), | |
13 function( i, name ) { | |
14 | |
15 // Handle event binding | |
16 jQuery.fn[ name ] = function( data, fn ) { | |
17 return arguments.length > 0 ? | |
18 this.on( name, null, data, fn ) : | |
19 this.trigger( name ); | |
20 }; | |
21 } ); | |
22 | |
23 jQuery.fn.extend( { | |
24 hover: function( fnOver, fnOut ) { | |
25 return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); | |
26 } | |
27 } ); | |
28 | |
29 } ); |