formtastic-jquery_inputmask 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bowerrc +3 -0
- data/bower.json +19 -0
- data/lib/formtastic/jquery_inputmask/engine.rb +1 -1
- data/lib/formtastic/jquery_inputmask/version.rb +1 -1
- data/vendor/inputmask/.bower.json +59 -0
- data/vendor/inputmask/bower.json +40 -0
- data/vendor/inputmask/dist/inputmask/bindings/inputmask.binding.js +21 -0
- data/vendor/inputmask/dist/inputmask/dependencyLibs/inputmask.dependencyLib.jqlite.js +62 -0
- data/vendor/inputmask/dist/inputmask/dependencyLibs/inputmask.dependencyLib.jquery.js +13 -0
- data/vendor/inputmask/dist/inputmask/dependencyLibs/inputmask.dependencyLib.js +133 -0
- data/vendor/inputmask/dist/inputmask/global/document.js +11 -0
- data/vendor/inputmask/dist/inputmask/global/window.js +11 -0
- data/vendor/inputmask/dist/inputmask/inputmask.date.extensions.js +490 -0
- data/vendor/inputmask/dist/inputmask/inputmask.extensions.js +97 -0
- data/vendor/inputmask/dist/inputmask/inputmask.js +1643 -0
- data/vendor/inputmask/dist/inputmask/inputmask.numeric.extensions.js +347 -0
- data/vendor/inputmask/dist/inputmask/inputmask.phone.extensions.js +61 -0
- data/vendor/inputmask/dist/inputmask/inputmask.regex.extensions.js +115 -0
- data/vendor/inputmask/dist/inputmask/jquery.inputmask.js +62 -0
- data/vendor/inputmask/dist/inputmask/phone-codes/phone-be.js +244 -0
- data/vendor/inputmask/dist/inputmask/phone-codes/phone-nl.js +924 -0
- data/vendor/inputmask/dist/inputmask/phone-codes/phone-ru.js +19240 -0
- data/vendor/inputmask/dist/inputmask/phone-codes/phone-uk.js +1009 -0
- data/vendor/inputmask/dist/inputmask/phone-codes/phone.js +2111 -0
- data/vendor/inputmask/dist/jquery.inputmask.bundle.js +3085 -0
- data/vendor/inputmask/dist/min/inputmask/inputmask.date.extensions.min.js +9 -0
- data/vendor/inputmask/dist/min/inputmask/inputmask.extensions.min.js +9 -0
- data/vendor/inputmask/dist/min/inputmask/inputmask.min.js +10 -0
- data/vendor/inputmask/dist/min/inputmask/inputmask.numeric.extensions.min.js +9 -0
- data/vendor/inputmask/dist/min/inputmask/inputmask.phone.extensions.min.js +9 -0
- data/vendor/inputmask/dist/min/inputmask/inputmask.regex.extensions.min.js +9 -0
- data/vendor/inputmask/dist/min/inputmask/jquery.inputmask.min.js +9 -0
- data/vendor/inputmask/dist/min/jquery.inputmask.bundle.min.js +11 -0
- data/vendor/jquery/.bower.json +25 -0
- data/vendor/jquery/AUTHORS.txt +301 -0
- data/vendor/jquery/LICENSE.txt +36 -0
- data/vendor/jquery/README.md +67 -0
- data/vendor/jquery/bower.json +14 -0
- data/vendor/jquery/dist/core.js +476 -0
- data/vendor/jquery/dist/jquery.js +10253 -0
- data/vendor/jquery/dist/jquery.min.js +4 -0
- data/vendor/jquery/dist/jquery.min.map +1 -0
- data/vendor/jquery/dist/jquery.slim.js +8160 -0
- data/vendor/jquery/dist/jquery.slim.min.js +4 -0
- data/vendor/jquery/dist/jquery.slim.min.map +1 -0
- data/vendor/jquery/external/sizzle/LICENSE.txt +36 -0
- data/vendor/jquery/external/sizzle/dist/sizzle.js +2272 -0
- data/vendor/jquery/external/sizzle/dist/sizzle.min.js +3 -0
- data/vendor/jquery/external/sizzle/dist/sizzle.min.map +1 -0
- data/vendor/jquery/src/.eslintrc.json +5 -0
- data/vendor/jquery/src/ajax.js +855 -0
- data/vendor/jquery/src/ajax/jsonp.js +102 -0
- data/vendor/jquery/src/ajax/load.js +76 -0
- data/vendor/jquery/src/ajax/parseXML.js +30 -0
- data/vendor/jquery/src/ajax/script.js +77 -0
- data/vendor/jquery/src/ajax/var/location.js +5 -0
- data/vendor/jquery/src/ajax/var/nonce.js +7 -0
- data/vendor/jquery/src/ajax/var/rquery.js +5 -0
- data/vendor/jquery/src/ajax/xhr.js +169 -0
- data/vendor/jquery/src/attributes.js +13 -0
- data/vendor/jquery/src/attributes/attr.js +141 -0
- data/vendor/jquery/src/attributes/classes.js +174 -0
- data/vendor/jquery/src/attributes/prop.js +143 -0
- data/vendor/jquery/src/attributes/support.js +33 -0
- data/vendor/jquery/src/attributes/val.js +190 -0
- data/vendor/jquery/src/callbacks.js +234 -0
- data/vendor/jquery/src/core.js +476 -0
- data/vendor/jquery/src/core/DOMEval.js +16 -0
- data/vendor/jquery/src/core/access.js +70 -0
- data/vendor/jquery/src/core/init.js +128 -0
- data/vendor/jquery/src/core/nodeName.js +13 -0
- data/vendor/jquery/src/core/parseHTML.js +65 -0
- data/vendor/jquery/src/core/ready-no-deferred.js +96 -0
- data/vendor/jquery/src/core/ready.js +86 -0
- data/vendor/jquery/src/core/readyException.js +13 -0
- data/vendor/jquery/src/core/stripAndCollapse.js +14 -0
- data/vendor/jquery/src/core/support.js +20 -0
- data/vendor/jquery/src/core/var/rsingleTag.js +6 -0
- data/vendor/jquery/src/css.js +438 -0
- data/vendor/jquery/src/css/addGetHookIf.js +26 -0
- data/vendor/jquery/src/css/adjustCSS.js +71 -0
- data/vendor/jquery/src/css/curCSS.js +65 -0
- data/vendor/jquery/src/css/hiddenVisibleSelectors.js +15 -0
- data/vendor/jquery/src/css/showHide.js +105 -0
- data/vendor/jquery/src/css/support.js +89 -0
- data/vendor/jquery/src/css/var/cssExpand.js +5 -0
- data/vendor/jquery/src/css/var/getStyles.js +17 -0
- data/vendor/jquery/src/css/var/isHiddenWithinTree.js +34 -0
- data/vendor/jquery/src/css/var/rmargin.js +5 -0
- data/vendor/jquery/src/css/var/rnumnonpx.js +7 -0
- data/vendor/jquery/src/css/var/swap.js +26 -0
- data/vendor/jquery/src/data.js +179 -0
- data/vendor/jquery/src/data/Data.js +161 -0
- data/vendor/jquery/src/data/var/acceptData.js +19 -0
- data/vendor/jquery/src/data/var/dataPriv.js +7 -0
- data/vendor/jquery/src/data/var/dataUser.js +7 -0
- data/vendor/jquery/src/deferred.js +391 -0
- data/vendor/jquery/src/deferred/exceptionHook.js +21 -0
- data/vendor/jquery/src/deprecated.js +40 -0
- data/vendor/jquery/src/dimensions.js +56 -0
- data/vendor/jquery/src/effects.js +699 -0
- data/vendor/jquery/src/effects/Tween.js +123 -0
- data/vendor/jquery/src/effects/animatedSelector.js +15 -0
- data/vendor/jquery/src/event.js +746 -0
- data/vendor/jquery/src/event/ajax.js +22 -0
- data/vendor/jquery/src/event/alias.js +29 -0
- data/vendor/jquery/src/event/focusin.js +55 -0
- data/vendor/jquery/src/event/support.js +11 -0
- data/vendor/jquery/src/event/trigger.js +185 -0
- data/vendor/jquery/src/exports/amd.js +26 -0
- data/vendor/jquery/src/exports/global.js +34 -0
- data/vendor/jquery/src/jquery.js +41 -0
- data/vendor/jquery/src/manipulation.js +488 -0
- data/vendor/jquery/src/manipulation/_evalUrl.js +23 -0
- data/vendor/jquery/src/manipulation/buildFragment.js +104 -0
- data/vendor/jquery/src/manipulation/getAll.js +32 -0
- data/vendor/jquery/src/manipulation/setGlobalEval.js +22 -0
- data/vendor/jquery/src/manipulation/support.js +35 -0
- data/vendor/jquery/src/manipulation/var/rcheckableType.js +5 -0
- data/vendor/jquery/src/manipulation/var/rscriptType.js +5 -0
- data/vendor/jquery/src/manipulation/var/rtagName.js +5 -0
- data/vendor/jquery/src/manipulation/wrapMap.js +29 -0
- data/vendor/jquery/src/offset.js +229 -0
- data/vendor/jquery/src/queue.js +145 -0
- data/vendor/jquery/src/queue/delay.js +24 -0
- data/vendor/jquery/src/selector-native.js +237 -0
- data/vendor/jquery/src/selector-sizzle.js +19 -0
- data/vendor/jquery/src/selector.js +3 -0
- data/vendor/jquery/src/serialize.js +130 -0
- data/vendor/jquery/src/traversing.js +191 -0
- data/vendor/jquery/src/traversing/findFilter.js +106 -0
- data/vendor/jquery/src/traversing/var/dir.js +22 -0
- data/vendor/jquery/src/traversing/var/rneedsContext.js +8 -0
- data/vendor/jquery/src/traversing/var/siblings.js +17 -0
- data/vendor/jquery/src/var/ObjectFunctionString.js +7 -0
- data/vendor/jquery/src/var/arr.js +5 -0
- data/vendor/jquery/src/var/class2type.js +6 -0
- data/vendor/jquery/src/var/concat.js +7 -0
- data/vendor/jquery/src/var/document.js +5 -0
- data/vendor/jquery/src/var/documentElement.js +7 -0
- data/vendor/jquery/src/var/fnToString.js +7 -0
- data/vendor/jquery/src/var/getProto.js +5 -0
- data/vendor/jquery/src/var/hasOwn.js +7 -0
- data/vendor/jquery/src/var/indexOf.js +7 -0
- data/vendor/jquery/src/var/pnum.js +5 -0
- data/vendor/jquery/src/var/push.js +7 -0
- data/vendor/jquery/src/var/rcssNum.js +9 -0
- data/vendor/jquery/src/var/rnothtmlwhite.js +8 -0
- data/vendor/jquery/src/var/slice.js +7 -0
- data/vendor/jquery/src/var/support.js +6 -0
- data/vendor/jquery/src/var/toString.js +7 -0
- data/vendor/jquery/src/wrap.js +77 -0
- metadata +152 -3
- data/.gitmodules +0 -3
@@ -0,0 +1,123 @@
|
|
1
|
+
define( [
|
2
|
+
"../core",
|
3
|
+
"../css"
|
4
|
+
], function( jQuery ) {
|
5
|
+
|
6
|
+
"use strict";
|
7
|
+
|
8
|
+
function Tween( elem, options, prop, end, easing ) {
|
9
|
+
return new Tween.prototype.init( elem, options, prop, end, easing );
|
10
|
+
}
|
11
|
+
jQuery.Tween = Tween;
|
12
|
+
|
13
|
+
Tween.prototype = {
|
14
|
+
constructor: Tween,
|
15
|
+
init: function( elem, options, prop, end, easing, unit ) {
|
16
|
+
this.elem = elem;
|
17
|
+
this.prop = prop;
|
18
|
+
this.easing = easing || jQuery.easing._default;
|
19
|
+
this.options = options;
|
20
|
+
this.start = this.now = this.cur();
|
21
|
+
this.end = end;
|
22
|
+
this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
|
23
|
+
},
|
24
|
+
cur: function() {
|
25
|
+
var hooks = Tween.propHooks[ this.prop ];
|
26
|
+
|
27
|
+
return hooks && hooks.get ?
|
28
|
+
hooks.get( this ) :
|
29
|
+
Tween.propHooks._default.get( this );
|
30
|
+
},
|
31
|
+
run: function( percent ) {
|
32
|
+
var eased,
|
33
|
+
hooks = Tween.propHooks[ this.prop ];
|
34
|
+
|
35
|
+
if ( this.options.duration ) {
|
36
|
+
this.pos = eased = jQuery.easing[ this.easing ](
|
37
|
+
percent, this.options.duration * percent, 0, 1, this.options.duration
|
38
|
+
);
|
39
|
+
} else {
|
40
|
+
this.pos = eased = percent;
|
41
|
+
}
|
42
|
+
this.now = ( this.end - this.start ) * eased + this.start;
|
43
|
+
|
44
|
+
if ( this.options.step ) {
|
45
|
+
this.options.step.call( this.elem, this.now, this );
|
46
|
+
}
|
47
|
+
|
48
|
+
if ( hooks && hooks.set ) {
|
49
|
+
hooks.set( this );
|
50
|
+
} else {
|
51
|
+
Tween.propHooks._default.set( this );
|
52
|
+
}
|
53
|
+
return this;
|
54
|
+
}
|
55
|
+
};
|
56
|
+
|
57
|
+
Tween.prototype.init.prototype = Tween.prototype;
|
58
|
+
|
59
|
+
Tween.propHooks = {
|
60
|
+
_default: {
|
61
|
+
get: function( tween ) {
|
62
|
+
var result;
|
63
|
+
|
64
|
+
// Use a property on the element directly when it is not a DOM element,
|
65
|
+
// or when there is no matching style property that exists.
|
66
|
+
if ( tween.elem.nodeType !== 1 ||
|
67
|
+
tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
|
68
|
+
return tween.elem[ tween.prop ];
|
69
|
+
}
|
70
|
+
|
71
|
+
// Passing an empty string as a 3rd parameter to .css will automatically
|
72
|
+
// attempt a parseFloat and fallback to a string if the parse fails.
|
73
|
+
// Simple values such as "10px" are parsed to Float;
|
74
|
+
// complex values such as "rotate(1rad)" are returned as-is.
|
75
|
+
result = jQuery.css( tween.elem, tween.prop, "" );
|
76
|
+
|
77
|
+
// Empty strings, null, undefined and "auto" are converted to 0.
|
78
|
+
return !result || result === "auto" ? 0 : result;
|
79
|
+
},
|
80
|
+
set: function( tween ) {
|
81
|
+
|
82
|
+
// Use step hook for back compat.
|
83
|
+
// Use cssHook if its there.
|
84
|
+
// Use .style if available and use plain properties where available.
|
85
|
+
if ( jQuery.fx.step[ tween.prop ] ) {
|
86
|
+
jQuery.fx.step[ tween.prop ]( tween );
|
87
|
+
} else if ( tween.elem.nodeType === 1 &&
|
88
|
+
( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||
|
89
|
+
jQuery.cssHooks[ tween.prop ] ) ) {
|
90
|
+
jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
|
91
|
+
} else {
|
92
|
+
tween.elem[ tween.prop ] = tween.now;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
96
|
+
};
|
97
|
+
|
98
|
+
// Support: IE <=9 only
|
99
|
+
// Panic based approach to setting things on disconnected nodes
|
100
|
+
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
|
101
|
+
set: function( tween ) {
|
102
|
+
if ( tween.elem.nodeType && tween.elem.parentNode ) {
|
103
|
+
tween.elem[ tween.prop ] = tween.now;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
};
|
107
|
+
|
108
|
+
jQuery.easing = {
|
109
|
+
linear: function( p ) {
|
110
|
+
return p;
|
111
|
+
},
|
112
|
+
swing: function( p ) {
|
113
|
+
return 0.5 - Math.cos( p * Math.PI ) / 2;
|
114
|
+
},
|
115
|
+
_default: "swing"
|
116
|
+
};
|
117
|
+
|
118
|
+
jQuery.fx = Tween.prototype.init;
|
119
|
+
|
120
|
+
// Back compat <1.8 extension point
|
121
|
+
jQuery.fx.step = {};
|
122
|
+
|
123
|
+
} );
|
@@ -0,0 +1,15 @@
|
|
1
|
+
define( [
|
2
|
+
"../core",
|
3
|
+
"../selector",
|
4
|
+
"../effects"
|
5
|
+
], function( jQuery ) {
|
6
|
+
|
7
|
+
"use strict";
|
8
|
+
|
9
|
+
jQuery.expr.pseudos.animated = function( elem ) {
|
10
|
+
return jQuery.grep( jQuery.timers, function( fn ) {
|
11
|
+
return elem === fn.elem;
|
12
|
+
} ).length;
|
13
|
+
};
|
14
|
+
|
15
|
+
} );
|
@@ -0,0 +1,746 @@
|
|
1
|
+
define( [
|
2
|
+
"./core",
|
3
|
+
"./var/document",
|
4
|
+
"./var/documentElement",
|
5
|
+
"./var/rnothtmlwhite",
|
6
|
+
"./var/slice",
|
7
|
+
"./data/var/dataPriv",
|
8
|
+
"./core/nodeName",
|
9
|
+
|
10
|
+
"./core/init",
|
11
|
+
"./selector"
|
12
|
+
], function( jQuery, document, documentElement, rnothtmlwhite, slice, dataPriv, nodeName ) {
|
13
|
+
|
14
|
+
"use strict";
|
15
|
+
|
16
|
+
var
|
17
|
+
rkeyEvent = /^key/,
|
18
|
+
rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
|
19
|
+
rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
|
20
|
+
|
21
|
+
function returnTrue() {
|
22
|
+
return true;
|
23
|
+
}
|
24
|
+
|
25
|
+
function returnFalse() {
|
26
|
+
return false;
|
27
|
+
}
|
28
|
+
|
29
|
+
// Support: IE <=9 only
|
30
|
+
// See #13393 for more info
|
31
|
+
function safeActiveElement() {
|
32
|
+
try {
|
33
|
+
return document.activeElement;
|
34
|
+
} catch ( err ) { }
|
35
|
+
}
|
36
|
+
|
37
|
+
function on( elem, types, selector, data, fn, one ) {
|
38
|
+
var origFn, type;
|
39
|
+
|
40
|
+
// Types can be a map of types/handlers
|
41
|
+
if ( typeof types === "object" ) {
|
42
|
+
|
43
|
+
// ( types-Object, selector, data )
|
44
|
+
if ( typeof selector !== "string" ) {
|
45
|
+
|
46
|
+
// ( types-Object, data )
|
47
|
+
data = data || selector;
|
48
|
+
selector = undefined;
|
49
|
+
}
|
50
|
+
for ( type in types ) {
|
51
|
+
on( elem, type, selector, data, types[ type ], one );
|
52
|
+
}
|
53
|
+
return elem;
|
54
|
+
}
|
55
|
+
|
56
|
+
if ( data == null && fn == null ) {
|
57
|
+
|
58
|
+
// ( types, fn )
|
59
|
+
fn = selector;
|
60
|
+
data = selector = undefined;
|
61
|
+
} else if ( fn == null ) {
|
62
|
+
if ( typeof selector === "string" ) {
|
63
|
+
|
64
|
+
// ( types, selector, fn )
|
65
|
+
fn = data;
|
66
|
+
data = undefined;
|
67
|
+
} else {
|
68
|
+
|
69
|
+
// ( types, data, fn )
|
70
|
+
fn = data;
|
71
|
+
data = selector;
|
72
|
+
selector = undefined;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
if ( fn === false ) {
|
76
|
+
fn = returnFalse;
|
77
|
+
} else if ( !fn ) {
|
78
|
+
return elem;
|
79
|
+
}
|
80
|
+
|
81
|
+
if ( one === 1 ) {
|
82
|
+
origFn = fn;
|
83
|
+
fn = function( event ) {
|
84
|
+
|
85
|
+
// Can use an empty set, since event contains the info
|
86
|
+
jQuery().off( event );
|
87
|
+
return origFn.apply( this, arguments );
|
88
|
+
};
|
89
|
+
|
90
|
+
// Use same guid so caller can remove using origFn
|
91
|
+
fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
|
92
|
+
}
|
93
|
+
return elem.each( function() {
|
94
|
+
jQuery.event.add( this, types, fn, data, selector );
|
95
|
+
} );
|
96
|
+
}
|
97
|
+
|
98
|
+
/*
|
99
|
+
* Helper functions for managing events -- not part of the public interface.
|
100
|
+
* Props to Dean Edwards' addEvent library for many of the ideas.
|
101
|
+
*/
|
102
|
+
jQuery.event = {
|
103
|
+
|
104
|
+
global: {},
|
105
|
+
|
106
|
+
add: function( elem, types, handler, data, selector ) {
|
107
|
+
|
108
|
+
var handleObjIn, eventHandle, tmp,
|
109
|
+
events, t, handleObj,
|
110
|
+
special, handlers, type, namespaces, origType,
|
111
|
+
elemData = dataPriv.get( elem );
|
112
|
+
|
113
|
+
// Don't attach events to noData or text/comment nodes (but allow plain objects)
|
114
|
+
if ( !elemData ) {
|
115
|
+
return;
|
116
|
+
}
|
117
|
+
|
118
|
+
// Caller can pass in an object of custom data in lieu of the handler
|
119
|
+
if ( handler.handler ) {
|
120
|
+
handleObjIn = handler;
|
121
|
+
handler = handleObjIn.handler;
|
122
|
+
selector = handleObjIn.selector;
|
123
|
+
}
|
124
|
+
|
125
|
+
// Ensure that invalid selectors throw exceptions at attach time
|
126
|
+
// Evaluate against documentElement in case elem is a non-element node (e.g., document)
|
127
|
+
if ( selector ) {
|
128
|
+
jQuery.find.matchesSelector( documentElement, selector );
|
129
|
+
}
|
130
|
+
|
131
|
+
// Make sure that the handler has a unique ID, used to find/remove it later
|
132
|
+
if ( !handler.guid ) {
|
133
|
+
handler.guid = jQuery.guid++;
|
134
|
+
}
|
135
|
+
|
136
|
+
// Init the element's event structure and main handler, if this is the first
|
137
|
+
if ( !( events = elemData.events ) ) {
|
138
|
+
events = elemData.events = {};
|
139
|
+
}
|
140
|
+
if ( !( eventHandle = elemData.handle ) ) {
|
141
|
+
eventHandle = elemData.handle = function( e ) {
|
142
|
+
|
143
|
+
// Discard the second event of a jQuery.event.trigger() and
|
144
|
+
// when an event is called after a page has unloaded
|
145
|
+
return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
|
146
|
+
jQuery.event.dispatch.apply( elem, arguments ) : undefined;
|
147
|
+
};
|
148
|
+
}
|
149
|
+
|
150
|
+
// Handle multiple events separated by a space
|
151
|
+
types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
|
152
|
+
t = types.length;
|
153
|
+
while ( t-- ) {
|
154
|
+
tmp = rtypenamespace.exec( types[ t ] ) || [];
|
155
|
+
type = origType = tmp[ 1 ];
|
156
|
+
namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
|
157
|
+
|
158
|
+
// There *must* be a type, no attaching namespace-only handlers
|
159
|
+
if ( !type ) {
|
160
|
+
continue;
|
161
|
+
}
|
162
|
+
|
163
|
+
// If event changes its type, use the special event handlers for the changed type
|
164
|
+
special = jQuery.event.special[ type ] || {};
|
165
|
+
|
166
|
+
// If selector defined, determine special event api type, otherwise given type
|
167
|
+
type = ( selector ? special.delegateType : special.bindType ) || type;
|
168
|
+
|
169
|
+
// Update special based on newly reset type
|
170
|
+
special = jQuery.event.special[ type ] || {};
|
171
|
+
|
172
|
+
// handleObj is passed to all event handlers
|
173
|
+
handleObj = jQuery.extend( {
|
174
|
+
type: type,
|
175
|
+
origType: origType,
|
176
|
+
data: data,
|
177
|
+
handler: handler,
|
178
|
+
guid: handler.guid,
|
179
|
+
selector: selector,
|
180
|
+
needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
|
181
|
+
namespace: namespaces.join( "." )
|
182
|
+
}, handleObjIn );
|
183
|
+
|
184
|
+
// Init the event handler queue if we're the first
|
185
|
+
if ( !( handlers = events[ type ] ) ) {
|
186
|
+
handlers = events[ type ] = [];
|
187
|
+
handlers.delegateCount = 0;
|
188
|
+
|
189
|
+
// Only use addEventListener if the special events handler returns false
|
190
|
+
if ( !special.setup ||
|
191
|
+
special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
|
192
|
+
|
193
|
+
if ( elem.addEventListener ) {
|
194
|
+
elem.addEventListener( type, eventHandle );
|
195
|
+
}
|
196
|
+
}
|
197
|
+
}
|
198
|
+
|
199
|
+
if ( special.add ) {
|
200
|
+
special.add.call( elem, handleObj );
|
201
|
+
|
202
|
+
if ( !handleObj.handler.guid ) {
|
203
|
+
handleObj.handler.guid = handler.guid;
|
204
|
+
}
|
205
|
+
}
|
206
|
+
|
207
|
+
// Add to the element's handler list, delegates in front
|
208
|
+
if ( selector ) {
|
209
|
+
handlers.splice( handlers.delegateCount++, 0, handleObj );
|
210
|
+
} else {
|
211
|
+
handlers.push( handleObj );
|
212
|
+
}
|
213
|
+
|
214
|
+
// Keep track of which events have ever been used, for event optimization
|
215
|
+
jQuery.event.global[ type ] = true;
|
216
|
+
}
|
217
|
+
|
218
|
+
},
|
219
|
+
|
220
|
+
// Detach an event or set of events from an element
|
221
|
+
remove: function( elem, types, handler, selector, mappedTypes ) {
|
222
|
+
|
223
|
+
var j, origCount, tmp,
|
224
|
+
events, t, handleObj,
|
225
|
+
special, handlers, type, namespaces, origType,
|
226
|
+
elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
|
227
|
+
|
228
|
+
if ( !elemData || !( events = elemData.events ) ) {
|
229
|
+
return;
|
230
|
+
}
|
231
|
+
|
232
|
+
// Once for each type.namespace in types; type may be omitted
|
233
|
+
types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
|
234
|
+
t = types.length;
|
235
|
+
while ( t-- ) {
|
236
|
+
tmp = rtypenamespace.exec( types[ t ] ) || [];
|
237
|
+
type = origType = tmp[ 1 ];
|
238
|
+
namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
|
239
|
+
|
240
|
+
// Unbind all events (on this namespace, if provided) for the element
|
241
|
+
if ( !type ) {
|
242
|
+
for ( type in events ) {
|
243
|
+
jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
|
244
|
+
}
|
245
|
+
continue;
|
246
|
+
}
|
247
|
+
|
248
|
+
special = jQuery.event.special[ type ] || {};
|
249
|
+
type = ( selector ? special.delegateType : special.bindType ) || type;
|
250
|
+
handlers = events[ type ] || [];
|
251
|
+
tmp = tmp[ 2 ] &&
|
252
|
+
new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
|
253
|
+
|
254
|
+
// Remove matching events
|
255
|
+
origCount = j = handlers.length;
|
256
|
+
while ( j-- ) {
|
257
|
+
handleObj = handlers[ j ];
|
258
|
+
|
259
|
+
if ( ( mappedTypes || origType === handleObj.origType ) &&
|
260
|
+
( !handler || handler.guid === handleObj.guid ) &&
|
261
|
+
( !tmp || tmp.test( handleObj.namespace ) ) &&
|
262
|
+
( !selector || selector === handleObj.selector ||
|
263
|
+
selector === "**" && handleObj.selector ) ) {
|
264
|
+
handlers.splice( j, 1 );
|
265
|
+
|
266
|
+
if ( handleObj.selector ) {
|
267
|
+
handlers.delegateCount--;
|
268
|
+
}
|
269
|
+
if ( special.remove ) {
|
270
|
+
special.remove.call( elem, handleObj );
|
271
|
+
}
|
272
|
+
}
|
273
|
+
}
|
274
|
+
|
275
|
+
// Remove generic event handler if we removed something and no more handlers exist
|
276
|
+
// (avoids potential for endless recursion during removal of special event handlers)
|
277
|
+
if ( origCount && !handlers.length ) {
|
278
|
+
if ( !special.teardown ||
|
279
|
+
special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
|
280
|
+
|
281
|
+
jQuery.removeEvent( elem, type, elemData.handle );
|
282
|
+
}
|
283
|
+
|
284
|
+
delete events[ type ];
|
285
|
+
}
|
286
|
+
}
|
287
|
+
|
288
|
+
// Remove data and the expando if it's no longer used
|
289
|
+
if ( jQuery.isEmptyObject( events ) ) {
|
290
|
+
dataPriv.remove( elem, "handle events" );
|
291
|
+
}
|
292
|
+
},
|
293
|
+
|
294
|
+
dispatch: function( nativeEvent ) {
|
295
|
+
|
296
|
+
// Make a writable jQuery.Event from the native event object
|
297
|
+
var event = jQuery.event.fix( nativeEvent );
|
298
|
+
|
299
|
+
var i, j, ret, matched, handleObj, handlerQueue,
|
300
|
+
args = new Array( arguments.length ),
|
301
|
+
handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],
|
302
|
+
special = jQuery.event.special[ event.type ] || {};
|
303
|
+
|
304
|
+
// Use the fix-ed jQuery.Event rather than the (read-only) native event
|
305
|
+
args[ 0 ] = event;
|
306
|
+
|
307
|
+
for ( i = 1; i < arguments.length; i++ ) {
|
308
|
+
args[ i ] = arguments[ i ];
|
309
|
+
}
|
310
|
+
|
311
|
+
event.delegateTarget = this;
|
312
|
+
|
313
|
+
// Call the preDispatch hook for the mapped type, and let it bail if desired
|
314
|
+
if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
|
315
|
+
return;
|
316
|
+
}
|
317
|
+
|
318
|
+
// Determine handlers
|
319
|
+
handlerQueue = jQuery.event.handlers.call( this, event, handlers );
|
320
|
+
|
321
|
+
// Run delegates first; they may want to stop propagation beneath us
|
322
|
+
i = 0;
|
323
|
+
while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
|
324
|
+
event.currentTarget = matched.elem;
|
325
|
+
|
326
|
+
j = 0;
|
327
|
+
while ( ( handleObj = matched.handlers[ j++ ] ) &&
|
328
|
+
!event.isImmediatePropagationStopped() ) {
|
329
|
+
|
330
|
+
// Triggered event must either 1) have no namespace, or 2) have namespace(s)
|
331
|
+
// a subset or equal to those in the bound event (both can have no namespace).
|
332
|
+
if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {
|
333
|
+
|
334
|
+
event.handleObj = handleObj;
|
335
|
+
event.data = handleObj.data;
|
336
|
+
|
337
|
+
ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
|
338
|
+
handleObj.handler ).apply( matched.elem, args );
|
339
|
+
|
340
|
+
if ( ret !== undefined ) {
|
341
|
+
if ( ( event.result = ret ) === false ) {
|
342
|
+
event.preventDefault();
|
343
|
+
event.stopPropagation();
|
344
|
+
}
|
345
|
+
}
|
346
|
+
}
|
347
|
+
}
|
348
|
+
}
|
349
|
+
|
350
|
+
// Call the postDispatch hook for the mapped type
|
351
|
+
if ( special.postDispatch ) {
|
352
|
+
special.postDispatch.call( this, event );
|
353
|
+
}
|
354
|
+
|
355
|
+
return event.result;
|
356
|
+
},
|
357
|
+
|
358
|
+
handlers: function( event, handlers ) {
|
359
|
+
var i, handleObj, sel, matchedHandlers, matchedSelectors,
|
360
|
+
handlerQueue = [],
|
361
|
+
delegateCount = handlers.delegateCount,
|
362
|
+
cur = event.target;
|
363
|
+
|
364
|
+
// Find delegate handlers
|
365
|
+
if ( delegateCount &&
|
366
|
+
|
367
|
+
// Support: IE <=9
|
368
|
+
// Black-hole SVG <use> instance trees (trac-13180)
|
369
|
+
cur.nodeType &&
|
370
|
+
|
371
|
+
// Support: Firefox <=42
|
372
|
+
// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
|
373
|
+
// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
|
374
|
+
// Support: IE 11 only
|
375
|
+
// ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
|
376
|
+
!( event.type === "click" && event.button >= 1 ) ) {
|
377
|
+
|
378
|
+
for ( ; cur !== this; cur = cur.parentNode || this ) {
|
379
|
+
|
380
|
+
// Don't check non-elements (#13208)
|
381
|
+
// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
|
382
|
+
if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
|
383
|
+
matchedHandlers = [];
|
384
|
+
matchedSelectors = {};
|
385
|
+
for ( i = 0; i < delegateCount; i++ ) {
|
386
|
+
handleObj = handlers[ i ];
|
387
|
+
|
388
|
+
// Don't conflict with Object.prototype properties (#13203)
|
389
|
+
sel = handleObj.selector + " ";
|
390
|
+
|
391
|
+
if ( matchedSelectors[ sel ] === undefined ) {
|
392
|
+
matchedSelectors[ sel ] = handleObj.needsContext ?
|
393
|
+
jQuery( sel, this ).index( cur ) > -1 :
|
394
|
+
jQuery.find( sel, this, null, [ cur ] ).length;
|
395
|
+
}
|
396
|
+
if ( matchedSelectors[ sel ] ) {
|
397
|
+
matchedHandlers.push( handleObj );
|
398
|
+
}
|
399
|
+
}
|
400
|
+
if ( matchedHandlers.length ) {
|
401
|
+
handlerQueue.push( { elem: cur, handlers: matchedHandlers } );
|
402
|
+
}
|
403
|
+
}
|
404
|
+
}
|
405
|
+
}
|
406
|
+
|
407
|
+
// Add the remaining (directly-bound) handlers
|
408
|
+
cur = this;
|
409
|
+
if ( delegateCount < handlers.length ) {
|
410
|
+
handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );
|
411
|
+
}
|
412
|
+
|
413
|
+
return handlerQueue;
|
414
|
+
},
|
415
|
+
|
416
|
+
addProp: function( name, hook ) {
|
417
|
+
Object.defineProperty( jQuery.Event.prototype, name, {
|
418
|
+
enumerable: true,
|
419
|
+
configurable: true,
|
420
|
+
|
421
|
+
get: jQuery.isFunction( hook ) ?
|
422
|
+
function() {
|
423
|
+
if ( this.originalEvent ) {
|
424
|
+
return hook( this.originalEvent );
|
425
|
+
}
|
426
|
+
} :
|
427
|
+
function() {
|
428
|
+
if ( this.originalEvent ) {
|
429
|
+
return this.originalEvent[ name ];
|
430
|
+
}
|
431
|
+
},
|
432
|
+
|
433
|
+
set: function( value ) {
|
434
|
+
Object.defineProperty( this, name, {
|
435
|
+
enumerable: true,
|
436
|
+
configurable: true,
|
437
|
+
writable: true,
|
438
|
+
value: value
|
439
|
+
} );
|
440
|
+
}
|
441
|
+
} );
|
442
|
+
},
|
443
|
+
|
444
|
+
fix: function( originalEvent ) {
|
445
|
+
return originalEvent[ jQuery.expando ] ?
|
446
|
+
originalEvent :
|
447
|
+
new jQuery.Event( originalEvent );
|
448
|
+
},
|
449
|
+
|
450
|
+
special: {
|
451
|
+
load: {
|
452
|
+
|
453
|
+
// Prevent triggered image.load events from bubbling to window.load
|
454
|
+
noBubble: true
|
455
|
+
},
|
456
|
+
focus: {
|
457
|
+
|
458
|
+
// Fire native event if possible so blur/focus sequence is correct
|
459
|
+
trigger: function() {
|
460
|
+
if ( this !== safeActiveElement() && this.focus ) {
|
461
|
+
this.focus();
|
462
|
+
return false;
|
463
|
+
}
|
464
|
+
},
|
465
|
+
delegateType: "focusin"
|
466
|
+
},
|
467
|
+
blur: {
|
468
|
+
trigger: function() {
|
469
|
+
if ( this === safeActiveElement() && this.blur ) {
|
470
|
+
this.blur();
|
471
|
+
return false;
|
472
|
+
}
|
473
|
+
},
|
474
|
+
delegateType: "focusout"
|
475
|
+
},
|
476
|
+
click: {
|
477
|
+
|
478
|
+
// For checkbox, fire native event so checked state will be right
|
479
|
+
trigger: function() {
|
480
|
+
if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) {
|
481
|
+
this.click();
|
482
|
+
return false;
|
483
|
+
}
|
484
|
+
},
|
485
|
+
|
486
|
+
// For cross-browser consistency, don't fire native .click() on links
|
487
|
+
_default: function( event ) {
|
488
|
+
return nodeName( event.target, "a" );
|
489
|
+
}
|
490
|
+
},
|
491
|
+
|
492
|
+
beforeunload: {
|
493
|
+
postDispatch: function( event ) {
|
494
|
+
|
495
|
+
// Support: Firefox 20+
|
496
|
+
// Firefox doesn't alert if the returnValue field is not set.
|
497
|
+
if ( event.result !== undefined && event.originalEvent ) {
|
498
|
+
event.originalEvent.returnValue = event.result;
|
499
|
+
}
|
500
|
+
}
|
501
|
+
}
|
502
|
+
}
|
503
|
+
};
|
504
|
+
|
505
|
+
jQuery.removeEvent = function( elem, type, handle ) {
|
506
|
+
|
507
|
+
// This "if" is needed for plain objects
|
508
|
+
if ( elem.removeEventListener ) {
|
509
|
+
elem.removeEventListener( type, handle );
|
510
|
+
}
|
511
|
+
};
|
512
|
+
|
513
|
+
jQuery.Event = function( src, props ) {
|
514
|
+
|
515
|
+
// Allow instantiation without the 'new' keyword
|
516
|
+
if ( !( this instanceof jQuery.Event ) ) {
|
517
|
+
return new jQuery.Event( src, props );
|
518
|
+
}
|
519
|
+
|
520
|
+
// Event object
|
521
|
+
if ( src && src.type ) {
|
522
|
+
this.originalEvent = src;
|
523
|
+
this.type = src.type;
|
524
|
+
|
525
|
+
// Events bubbling up the document may have been marked as prevented
|
526
|
+
// by a handler lower down the tree; reflect the correct value.
|
527
|
+
this.isDefaultPrevented = src.defaultPrevented ||
|
528
|
+
src.defaultPrevented === undefined &&
|
529
|
+
|
530
|
+
// Support: Android <=2.3 only
|
531
|
+
src.returnValue === false ?
|
532
|
+
returnTrue :
|
533
|
+
returnFalse;
|
534
|
+
|
535
|
+
// Create target properties
|
536
|
+
// Support: Safari <=6 - 7 only
|
537
|
+
// Target should not be a text node (#504, #13143)
|
538
|
+
this.target = ( src.target && src.target.nodeType === 3 ) ?
|
539
|
+
src.target.parentNode :
|
540
|
+
src.target;
|
541
|
+
|
542
|
+
this.currentTarget = src.currentTarget;
|
543
|
+
this.relatedTarget = src.relatedTarget;
|
544
|
+
|
545
|
+
// Event type
|
546
|
+
} else {
|
547
|
+
this.type = src;
|
548
|
+
}
|
549
|
+
|
550
|
+
// Put explicitly provided properties onto the event object
|
551
|
+
if ( props ) {
|
552
|
+
jQuery.extend( this, props );
|
553
|
+
}
|
554
|
+
|
555
|
+
// Create a timestamp if incoming event doesn't have one
|
556
|
+
this.timeStamp = src && src.timeStamp || jQuery.now();
|
557
|
+
|
558
|
+
// Mark it as fixed
|
559
|
+
this[ jQuery.expando ] = true;
|
560
|
+
};
|
561
|
+
|
562
|
+
// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
|
563
|
+
// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
|
564
|
+
jQuery.Event.prototype = {
|
565
|
+
constructor: jQuery.Event,
|
566
|
+
isDefaultPrevented: returnFalse,
|
567
|
+
isPropagationStopped: returnFalse,
|
568
|
+
isImmediatePropagationStopped: returnFalse,
|
569
|
+
isSimulated: false,
|
570
|
+
|
571
|
+
preventDefault: function() {
|
572
|
+
var e = this.originalEvent;
|
573
|
+
|
574
|
+
this.isDefaultPrevented = returnTrue;
|
575
|
+
|
576
|
+
if ( e && !this.isSimulated ) {
|
577
|
+
e.preventDefault();
|
578
|
+
}
|
579
|
+
},
|
580
|
+
stopPropagation: function() {
|
581
|
+
var e = this.originalEvent;
|
582
|
+
|
583
|
+
this.isPropagationStopped = returnTrue;
|
584
|
+
|
585
|
+
if ( e && !this.isSimulated ) {
|
586
|
+
e.stopPropagation();
|
587
|
+
}
|
588
|
+
},
|
589
|
+
stopImmediatePropagation: function() {
|
590
|
+
var e = this.originalEvent;
|
591
|
+
|
592
|
+
this.isImmediatePropagationStopped = returnTrue;
|
593
|
+
|
594
|
+
if ( e && !this.isSimulated ) {
|
595
|
+
e.stopImmediatePropagation();
|
596
|
+
}
|
597
|
+
|
598
|
+
this.stopPropagation();
|
599
|
+
}
|
600
|
+
};
|
601
|
+
|
602
|
+
// Includes all common event props including KeyEvent and MouseEvent specific props
|
603
|
+
jQuery.each( {
|
604
|
+
altKey: true,
|
605
|
+
bubbles: true,
|
606
|
+
cancelable: true,
|
607
|
+
changedTouches: true,
|
608
|
+
ctrlKey: true,
|
609
|
+
detail: true,
|
610
|
+
eventPhase: true,
|
611
|
+
metaKey: true,
|
612
|
+
pageX: true,
|
613
|
+
pageY: true,
|
614
|
+
shiftKey: true,
|
615
|
+
view: true,
|
616
|
+
"char": true,
|
617
|
+
charCode: true,
|
618
|
+
key: true,
|
619
|
+
keyCode: true,
|
620
|
+
button: true,
|
621
|
+
buttons: true,
|
622
|
+
clientX: true,
|
623
|
+
clientY: true,
|
624
|
+
offsetX: true,
|
625
|
+
offsetY: true,
|
626
|
+
pointerId: true,
|
627
|
+
pointerType: true,
|
628
|
+
screenX: true,
|
629
|
+
screenY: true,
|
630
|
+
targetTouches: true,
|
631
|
+
toElement: true,
|
632
|
+
touches: true,
|
633
|
+
|
634
|
+
which: function( event ) {
|
635
|
+
var button = event.button;
|
636
|
+
|
637
|
+
// Add which for key events
|
638
|
+
if ( event.which == null && rkeyEvent.test( event.type ) ) {
|
639
|
+
return event.charCode != null ? event.charCode : event.keyCode;
|
640
|
+
}
|
641
|
+
|
642
|
+
// Add which for click: 1 === left; 2 === middle; 3 === right
|
643
|
+
if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {
|
644
|
+
if ( button & 1 ) {
|
645
|
+
return 1;
|
646
|
+
}
|
647
|
+
|
648
|
+
if ( button & 2 ) {
|
649
|
+
return 3;
|
650
|
+
}
|
651
|
+
|
652
|
+
if ( button & 4 ) {
|
653
|
+
return 2;
|
654
|
+
}
|
655
|
+
|
656
|
+
return 0;
|
657
|
+
}
|
658
|
+
|
659
|
+
return event.which;
|
660
|
+
}
|
661
|
+
}, jQuery.event.addProp );
|
662
|
+
|
663
|
+
// Create mouseenter/leave events using mouseover/out and event-time checks
|
664
|
+
// so that event delegation works in jQuery.
|
665
|
+
// Do the same for pointerenter/pointerleave and pointerover/pointerout
|
666
|
+
//
|
667
|
+
// Support: Safari 7 only
|
668
|
+
// Safari sends mouseenter too often; see:
|
669
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=470258
|
670
|
+
// for the description of the bug (it existed in older Chrome versions as well).
|
671
|
+
jQuery.each( {
|
672
|
+
mouseenter: "mouseover",
|
673
|
+
mouseleave: "mouseout",
|
674
|
+
pointerenter: "pointerover",
|
675
|
+
pointerleave: "pointerout"
|
676
|
+
}, function( orig, fix ) {
|
677
|
+
jQuery.event.special[ orig ] = {
|
678
|
+
delegateType: fix,
|
679
|
+
bindType: fix,
|
680
|
+
|
681
|
+
handle: function( event ) {
|
682
|
+
var ret,
|
683
|
+
target = this,
|
684
|
+
related = event.relatedTarget,
|
685
|
+
handleObj = event.handleObj;
|
686
|
+
|
687
|
+
// For mouseenter/leave call the handler if related is outside the target.
|
688
|
+
// NB: No relatedTarget if the mouse left/entered the browser window
|
689
|
+
if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
|
690
|
+
event.type = handleObj.origType;
|
691
|
+
ret = handleObj.handler.apply( this, arguments );
|
692
|
+
event.type = fix;
|
693
|
+
}
|
694
|
+
return ret;
|
695
|
+
}
|
696
|
+
};
|
697
|
+
} );
|
698
|
+
|
699
|
+
jQuery.fn.extend( {
|
700
|
+
|
701
|
+
on: function( types, selector, data, fn ) {
|
702
|
+
return on( this, types, selector, data, fn );
|
703
|
+
},
|
704
|
+
one: function( types, selector, data, fn ) {
|
705
|
+
return on( this, types, selector, data, fn, 1 );
|
706
|
+
},
|
707
|
+
off: function( types, selector, fn ) {
|
708
|
+
var handleObj, type;
|
709
|
+
if ( types && types.preventDefault && types.handleObj ) {
|
710
|
+
|
711
|
+
// ( event ) dispatched jQuery.Event
|
712
|
+
handleObj = types.handleObj;
|
713
|
+
jQuery( types.delegateTarget ).off(
|
714
|
+
handleObj.namespace ?
|
715
|
+
handleObj.origType + "." + handleObj.namespace :
|
716
|
+
handleObj.origType,
|
717
|
+
handleObj.selector,
|
718
|
+
handleObj.handler
|
719
|
+
);
|
720
|
+
return this;
|
721
|
+
}
|
722
|
+
if ( typeof types === "object" ) {
|
723
|
+
|
724
|
+
// ( types-object [, selector] )
|
725
|
+
for ( type in types ) {
|
726
|
+
this.off( type, selector, types[ type ] );
|
727
|
+
}
|
728
|
+
return this;
|
729
|
+
}
|
730
|
+
if ( selector === false || typeof selector === "function" ) {
|
731
|
+
|
732
|
+
// ( types [, fn] )
|
733
|
+
fn = selector;
|
734
|
+
selector = undefined;
|
735
|
+
}
|
736
|
+
if ( fn === false ) {
|
737
|
+
fn = returnFalse;
|
738
|
+
}
|
739
|
+
return this.each( function() {
|
740
|
+
jQuery.event.remove( this, types, fn, selector );
|
741
|
+
} );
|
742
|
+
}
|
743
|
+
} );
|
744
|
+
|
745
|
+
return jQuery;
|
746
|
+
} );
|