Blame view

bower_components/jquery/src/event/alias.js 1.07 KB
c5169e0e   Renato De Donato   a new hope
1
  define([
74249687   Luigi Serra   Cross browser con...
2
  	"../core",
c5169e0e   Renato De Donato   a new hope
3
  	"../event"
74249687   Luigi Serra   Cross browser con...
4
5
  ], function( jQuery ) {
  
c5169e0e   Renato De Donato   a new hope
6
  jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
74249687   Luigi Serra   Cross browser con...
7
  	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
c5169e0e   Renato De Donato   a new hope
8
  	"change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
74249687   Luigi Serra   Cross browser con...
9
10
11
12
13
14
15
  
  	// Handle event binding
  	jQuery.fn[ name ] = function( data, fn ) {
  		return arguments.length > 0 ?
  			this.on( name, null, data, fn ) :
  			this.trigger( name );
  	};
c5169e0e   Renato De Donato   a new hope
16
  });
74249687   Luigi Serra   Cross browser con...
17
  
c5169e0e   Renato De Donato   a new hope
18
  jQuery.fn.extend({
74249687   Luigi Serra   Cross browser con...
19
20
  	hover: function( fnOver, fnOut ) {
  		return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
c5169e0e   Renato De Donato   a new hope
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
  	},
  
  	bind: function( types, data, fn ) {
  		return this.on( types, null, data, fn );
  	},
  	unbind: function( types, fn ) {
  		return this.off( types, null, fn );
  	},
  
  	delegate: function( selector, types, data, fn ) {
  		return this.on( types, selector, data, fn );
  	},
  	undelegate: function( selector, types, fn ) {
  		// ( namespace ) or ( selector, types [, fn] )
  		return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
74249687   Luigi Serra   Cross browser con...
36
  	}
c5169e0e   Renato De Donato   a new hope
37
  });
74249687   Luigi Serra   Cross browser con...
38
  
c5169e0e   Renato De Donato   a new hope
39
  });