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,22 @@
|
|
1
|
+
define( [
|
2
|
+
"../core",
|
3
|
+
"../event"
|
4
|
+
], function( jQuery ) {
|
5
|
+
|
6
|
+
"use strict";
|
7
|
+
|
8
|
+
// Attach a bunch of functions for handling common AJAX events
|
9
|
+
jQuery.each( [
|
10
|
+
"ajaxStart",
|
11
|
+
"ajaxStop",
|
12
|
+
"ajaxComplete",
|
13
|
+
"ajaxError",
|
14
|
+
"ajaxSuccess",
|
15
|
+
"ajaxSend"
|
16
|
+
], function( i, type ) {
|
17
|
+
jQuery.fn[ type ] = function( fn ) {
|
18
|
+
return this.on( type, fn );
|
19
|
+
};
|
20
|
+
} );
|
21
|
+
|
22
|
+
} );
|
@@ -0,0 +1,29 @@
|
|
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
|
+
} );
|
@@ -0,0 +1,55 @@
|
|
1
|
+
define( [
|
2
|
+
"../core",
|
3
|
+
"../data/var/dataPriv",
|
4
|
+
"./support",
|
5
|
+
|
6
|
+
"../event",
|
7
|
+
"./trigger"
|
8
|
+
], function( jQuery, dataPriv, support ) {
|
9
|
+
|
10
|
+
"use strict";
|
11
|
+
|
12
|
+
// Support: Firefox <=44
|
13
|
+
// Firefox doesn't have focus(in | out) events
|
14
|
+
// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
|
15
|
+
//
|
16
|
+
// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
|
17
|
+
// focus(in | out) events fire after focus & blur events,
|
18
|
+
// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
|
19
|
+
// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
|
20
|
+
if ( !support.focusin ) {
|
21
|
+
jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
|
22
|
+
|
23
|
+
// Attach a single capturing handler on the document while someone wants focusin/focusout
|
24
|
+
var handler = function( event ) {
|
25
|
+
jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
|
26
|
+
};
|
27
|
+
|
28
|
+
jQuery.event.special[ fix ] = {
|
29
|
+
setup: function() {
|
30
|
+
var doc = this.ownerDocument || this,
|
31
|
+
attaches = dataPriv.access( doc, fix );
|
32
|
+
|
33
|
+
if ( !attaches ) {
|
34
|
+
doc.addEventListener( orig, handler, true );
|
35
|
+
}
|
36
|
+
dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
|
37
|
+
},
|
38
|
+
teardown: function() {
|
39
|
+
var doc = this.ownerDocument || this,
|
40
|
+
attaches = dataPriv.access( doc, fix ) - 1;
|
41
|
+
|
42
|
+
if ( !attaches ) {
|
43
|
+
doc.removeEventListener( orig, handler, true );
|
44
|
+
dataPriv.remove( doc, fix );
|
45
|
+
|
46
|
+
} else {
|
47
|
+
dataPriv.access( doc, fix, attaches );
|
48
|
+
}
|
49
|
+
}
|
50
|
+
};
|
51
|
+
} );
|
52
|
+
}
|
53
|
+
|
54
|
+
return jQuery;
|
55
|
+
} );
|
@@ -0,0 +1,185 @@
|
|
1
|
+
define( [
|
2
|
+
"../core",
|
3
|
+
"../var/document",
|
4
|
+
"../data/var/dataPriv",
|
5
|
+
"../data/var/acceptData",
|
6
|
+
"../var/hasOwn",
|
7
|
+
|
8
|
+
"../event"
|
9
|
+
], function( jQuery, document, dataPriv, acceptData, hasOwn ) {
|
10
|
+
|
11
|
+
"use strict";
|
12
|
+
|
13
|
+
var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;
|
14
|
+
|
15
|
+
jQuery.extend( jQuery.event, {
|
16
|
+
|
17
|
+
trigger: function( event, data, elem, onlyHandlers ) {
|
18
|
+
|
19
|
+
var i, cur, tmp, bubbleType, ontype, handle, special,
|
20
|
+
eventPath = [ elem || document ],
|
21
|
+
type = hasOwn.call( event, "type" ) ? event.type : event,
|
22
|
+
namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];
|
23
|
+
|
24
|
+
cur = tmp = elem = elem || document;
|
25
|
+
|
26
|
+
// Don't do events on text and comment nodes
|
27
|
+
if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
|
28
|
+
return;
|
29
|
+
}
|
30
|
+
|
31
|
+
// focus/blur morphs to focusin/out; ensure we're not firing them right now
|
32
|
+
if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
|
33
|
+
return;
|
34
|
+
}
|
35
|
+
|
36
|
+
if ( type.indexOf( "." ) > -1 ) {
|
37
|
+
|
38
|
+
// Namespaced trigger; create a regexp to match event type in handle()
|
39
|
+
namespaces = type.split( "." );
|
40
|
+
type = namespaces.shift();
|
41
|
+
namespaces.sort();
|
42
|
+
}
|
43
|
+
ontype = type.indexOf( ":" ) < 0 && "on" + type;
|
44
|
+
|
45
|
+
// Caller can pass in a jQuery.Event object, Object, or just an event type string
|
46
|
+
event = event[ jQuery.expando ] ?
|
47
|
+
event :
|
48
|
+
new jQuery.Event( type, typeof event === "object" && event );
|
49
|
+
|
50
|
+
// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
|
51
|
+
event.isTrigger = onlyHandlers ? 2 : 3;
|
52
|
+
event.namespace = namespaces.join( "." );
|
53
|
+
event.rnamespace = event.namespace ?
|
54
|
+
new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
|
55
|
+
null;
|
56
|
+
|
57
|
+
// Clean up the event in case it is being reused
|
58
|
+
event.result = undefined;
|
59
|
+
if ( !event.target ) {
|
60
|
+
event.target = elem;
|
61
|
+
}
|
62
|
+
|
63
|
+
// Clone any incoming data and prepend the event, creating the handler arg list
|
64
|
+
data = data == null ?
|
65
|
+
[ event ] :
|
66
|
+
jQuery.makeArray( data, [ event ] );
|
67
|
+
|
68
|
+
// Allow special events to draw outside the lines
|
69
|
+
special = jQuery.event.special[ type ] || {};
|
70
|
+
if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
|
71
|
+
return;
|
72
|
+
}
|
73
|
+
|
74
|
+
// Determine event propagation path in advance, per W3C events spec (#9951)
|
75
|
+
// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
|
76
|
+
if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
|
77
|
+
|
78
|
+
bubbleType = special.delegateType || type;
|
79
|
+
if ( !rfocusMorph.test( bubbleType + type ) ) {
|
80
|
+
cur = cur.parentNode;
|
81
|
+
}
|
82
|
+
for ( ; cur; cur = cur.parentNode ) {
|
83
|
+
eventPath.push( cur );
|
84
|
+
tmp = cur;
|
85
|
+
}
|
86
|
+
|
87
|
+
// Only add window if we got to document (e.g., not plain obj or detached DOM)
|
88
|
+
if ( tmp === ( elem.ownerDocument || document ) ) {
|
89
|
+
eventPath.push( tmp.defaultView || tmp.parentWindow || window );
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
93
|
+
// Fire handlers on the event path
|
94
|
+
i = 0;
|
95
|
+
while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
|
96
|
+
|
97
|
+
event.type = i > 1 ?
|
98
|
+
bubbleType :
|
99
|
+
special.bindType || type;
|
100
|
+
|
101
|
+
// jQuery handler
|
102
|
+
handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] &&
|
103
|
+
dataPriv.get( cur, "handle" );
|
104
|
+
if ( handle ) {
|
105
|
+
handle.apply( cur, data );
|
106
|
+
}
|
107
|
+
|
108
|
+
// Native handler
|
109
|
+
handle = ontype && cur[ ontype ];
|
110
|
+
if ( handle && handle.apply && acceptData( cur ) ) {
|
111
|
+
event.result = handle.apply( cur, data );
|
112
|
+
if ( event.result === false ) {
|
113
|
+
event.preventDefault();
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}
|
117
|
+
event.type = type;
|
118
|
+
|
119
|
+
// If nobody prevented the default action, do it now
|
120
|
+
if ( !onlyHandlers && !event.isDefaultPrevented() ) {
|
121
|
+
|
122
|
+
if ( ( !special._default ||
|
123
|
+
special._default.apply( eventPath.pop(), data ) === false ) &&
|
124
|
+
acceptData( elem ) ) {
|
125
|
+
|
126
|
+
// Call a native DOM method on the target with the same name as the event.
|
127
|
+
// Don't do default actions on window, that's where global variables be (#6170)
|
128
|
+
if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {
|
129
|
+
|
130
|
+
// Don't re-trigger an onFOO event when we call its FOO() method
|
131
|
+
tmp = elem[ ontype ];
|
132
|
+
|
133
|
+
if ( tmp ) {
|
134
|
+
elem[ ontype ] = null;
|
135
|
+
}
|
136
|
+
|
137
|
+
// Prevent re-triggering of the same event, since we already bubbled it above
|
138
|
+
jQuery.event.triggered = type;
|
139
|
+
elem[ type ]();
|
140
|
+
jQuery.event.triggered = undefined;
|
141
|
+
|
142
|
+
if ( tmp ) {
|
143
|
+
elem[ ontype ] = tmp;
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|
147
|
+
}
|
148
|
+
|
149
|
+
return event.result;
|
150
|
+
},
|
151
|
+
|
152
|
+
// Piggyback on a donor event to simulate a different one
|
153
|
+
// Used only for `focus(in | out)` events
|
154
|
+
simulate: function( type, elem, event ) {
|
155
|
+
var e = jQuery.extend(
|
156
|
+
new jQuery.Event(),
|
157
|
+
event,
|
158
|
+
{
|
159
|
+
type: type,
|
160
|
+
isSimulated: true
|
161
|
+
}
|
162
|
+
);
|
163
|
+
|
164
|
+
jQuery.event.trigger( e, null, elem );
|
165
|
+
}
|
166
|
+
|
167
|
+
} );
|
168
|
+
|
169
|
+
jQuery.fn.extend( {
|
170
|
+
|
171
|
+
trigger: function( type, data ) {
|
172
|
+
return this.each( function() {
|
173
|
+
jQuery.event.trigger( type, data, this );
|
174
|
+
} );
|
175
|
+
},
|
176
|
+
triggerHandler: function( type, data ) {
|
177
|
+
var elem = this[ 0 ];
|
178
|
+
if ( elem ) {
|
179
|
+
return jQuery.event.trigger( type, data, elem, true );
|
180
|
+
}
|
181
|
+
}
|
182
|
+
} );
|
183
|
+
|
184
|
+
return jQuery;
|
185
|
+
} );
|
@@ -0,0 +1,26 @@
|
|
1
|
+
define( [
|
2
|
+
"../core"
|
3
|
+
], function( jQuery ) {
|
4
|
+
|
5
|
+
"use strict";
|
6
|
+
|
7
|
+
// Register as a named AMD module, since jQuery can be concatenated with other
|
8
|
+
// files that may use define, but not via a proper concatenation script that
|
9
|
+
// understands anonymous AMD modules. A named AMD is safest and most robust
|
10
|
+
// way to register. Lowercase jquery is used because AMD module names are
|
11
|
+
// derived from file names, and jQuery is normally delivered in a lowercase
|
12
|
+
// file name. Do this after creating the global so that if an AMD module wants
|
13
|
+
// to call noConflict to hide this version of jQuery, it will work.
|
14
|
+
|
15
|
+
// Note that for maximum portability, libraries that are not jQuery should
|
16
|
+
// declare themselves as anonymous modules, and avoid setting a global if an
|
17
|
+
// AMD loader is present. jQuery is a special case. For more information, see
|
18
|
+
// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
|
19
|
+
|
20
|
+
if ( typeof define === "function" && define.amd ) {
|
21
|
+
define( "jquery", [], function() {
|
22
|
+
return jQuery;
|
23
|
+
} );
|
24
|
+
}
|
25
|
+
|
26
|
+
} );
|
@@ -0,0 +1,34 @@
|
|
1
|
+
define( [
|
2
|
+
"../core"
|
3
|
+
], function( jQuery, noGlobal ) {
|
4
|
+
|
5
|
+
"use strict";
|
6
|
+
|
7
|
+
var
|
8
|
+
|
9
|
+
// Map over jQuery in case of overwrite
|
10
|
+
_jQuery = window.jQuery,
|
11
|
+
|
12
|
+
// Map over the $ in case of overwrite
|
13
|
+
_$ = window.$;
|
14
|
+
|
15
|
+
jQuery.noConflict = function( deep ) {
|
16
|
+
if ( window.$ === jQuery ) {
|
17
|
+
window.$ = _$;
|
18
|
+
}
|
19
|
+
|
20
|
+
if ( deep && window.jQuery === jQuery ) {
|
21
|
+
window.jQuery = _jQuery;
|
22
|
+
}
|
23
|
+
|
24
|
+
return jQuery;
|
25
|
+
};
|
26
|
+
|
27
|
+
// Expose jQuery and $ identifiers, even in AMD
|
28
|
+
// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
|
29
|
+
// and CommonJS for browser emulators (#13566)
|
30
|
+
if ( !noGlobal ) {
|
31
|
+
window.jQuery = window.$ = jQuery;
|
32
|
+
}
|
33
|
+
|
34
|
+
} );
|
@@ -0,0 +1,41 @@
|
|
1
|
+
define( [
|
2
|
+
"./core",
|
3
|
+
"./selector",
|
4
|
+
"./traversing",
|
5
|
+
"./callbacks",
|
6
|
+
"./deferred",
|
7
|
+
"./deferred/exceptionHook",
|
8
|
+
"./core/ready",
|
9
|
+
"./data",
|
10
|
+
"./queue",
|
11
|
+
"./queue/delay",
|
12
|
+
"./attributes",
|
13
|
+
"./event",
|
14
|
+
"./event/alias",
|
15
|
+
"./event/focusin",
|
16
|
+
"./manipulation",
|
17
|
+
"./manipulation/_evalUrl",
|
18
|
+
"./wrap",
|
19
|
+
"./css",
|
20
|
+
"./css/hiddenVisibleSelectors",
|
21
|
+
"./serialize",
|
22
|
+
"./ajax",
|
23
|
+
"./ajax/xhr",
|
24
|
+
"./ajax/script",
|
25
|
+
"./ajax/jsonp",
|
26
|
+
"./ajax/load",
|
27
|
+
"./event/ajax",
|
28
|
+
"./effects",
|
29
|
+
"./effects/animatedSelector",
|
30
|
+
"./offset",
|
31
|
+
"./dimensions",
|
32
|
+
"./deprecated",
|
33
|
+
"./exports/amd",
|
34
|
+
"./exports/global"
|
35
|
+
], function( jQuery ) {
|
36
|
+
|
37
|
+
"use strict";
|
38
|
+
|
39
|
+
return jQuery;
|
40
|
+
|
41
|
+
} );
|
@@ -0,0 +1,488 @@
|
|
1
|
+
define( [
|
2
|
+
"./core",
|
3
|
+
"./var/concat",
|
4
|
+
"./var/push",
|
5
|
+
"./core/access",
|
6
|
+
"./manipulation/var/rcheckableType",
|
7
|
+
"./manipulation/var/rtagName",
|
8
|
+
"./manipulation/var/rscriptType",
|
9
|
+
"./manipulation/wrapMap",
|
10
|
+
"./manipulation/getAll",
|
11
|
+
"./manipulation/setGlobalEval",
|
12
|
+
"./manipulation/buildFragment",
|
13
|
+
"./manipulation/support",
|
14
|
+
|
15
|
+
"./data/var/dataPriv",
|
16
|
+
"./data/var/dataUser",
|
17
|
+
"./data/var/acceptData",
|
18
|
+
"./core/DOMEval",
|
19
|
+
"./core/nodeName",
|
20
|
+
|
21
|
+
"./core/init",
|
22
|
+
"./traversing",
|
23
|
+
"./selector",
|
24
|
+
"./event"
|
25
|
+
], function( jQuery, concat, push, access,
|
26
|
+
rcheckableType, rtagName, rscriptType,
|
27
|
+
wrapMap, getAll, setGlobalEval, buildFragment, support,
|
28
|
+
dataPriv, dataUser, acceptData, DOMEval, nodeName ) {
|
29
|
+
|
30
|
+
"use strict";
|
31
|
+
|
32
|
+
var
|
33
|
+
|
34
|
+
/* eslint-disable max-len */
|
35
|
+
|
36
|
+
// See https://github.com/eslint/eslint/issues/3229
|
37
|
+
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,
|
38
|
+
|
39
|
+
/* eslint-enable */
|
40
|
+
|
41
|
+
// Support: IE <=10 - 11, Edge 12 - 13
|
42
|
+
// In IE/Edge using regex groups here causes severe slowdowns.
|
43
|
+
// See https://connect.microsoft.com/IE/feedback/details/1736512/
|
44
|
+
rnoInnerhtml = /<script|<style|<link/i,
|
45
|
+
|
46
|
+
// checked="checked" or checked
|
47
|
+
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
|
48
|
+
rscriptTypeMasked = /^true\/(.*)/,
|
49
|
+
rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
|
50
|
+
|
51
|
+
// Prefer a tbody over its parent table for containing new rows
|
52
|
+
function manipulationTarget( elem, content ) {
|
53
|
+
if ( nodeName( elem, "table" ) &&
|
54
|
+
nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
|
55
|
+
|
56
|
+
return jQuery( ">tbody", elem )[ 0 ] || elem;
|
57
|
+
}
|
58
|
+
|
59
|
+
return elem;
|
60
|
+
}
|
61
|
+
|
62
|
+
// Replace/restore the type attribute of script elements for safe DOM manipulation
|
63
|
+
function disableScript( elem ) {
|
64
|
+
elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
|
65
|
+
return elem;
|
66
|
+
}
|
67
|
+
function restoreScript( elem ) {
|
68
|
+
var match = rscriptTypeMasked.exec( elem.type );
|
69
|
+
|
70
|
+
if ( match ) {
|
71
|
+
elem.type = match[ 1 ];
|
72
|
+
} else {
|
73
|
+
elem.removeAttribute( "type" );
|
74
|
+
}
|
75
|
+
|
76
|
+
return elem;
|
77
|
+
}
|
78
|
+
|
79
|
+
function cloneCopyEvent( src, dest ) {
|
80
|
+
var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
|
81
|
+
|
82
|
+
if ( dest.nodeType !== 1 ) {
|
83
|
+
return;
|
84
|
+
}
|
85
|
+
|
86
|
+
// 1. Copy private data: events, handlers, etc.
|
87
|
+
if ( dataPriv.hasData( src ) ) {
|
88
|
+
pdataOld = dataPriv.access( src );
|
89
|
+
pdataCur = dataPriv.set( dest, pdataOld );
|
90
|
+
events = pdataOld.events;
|
91
|
+
|
92
|
+
if ( events ) {
|
93
|
+
delete pdataCur.handle;
|
94
|
+
pdataCur.events = {};
|
95
|
+
|
96
|
+
for ( type in events ) {
|
97
|
+
for ( i = 0, l = events[ type ].length; i < l; i++ ) {
|
98
|
+
jQuery.event.add( dest, type, events[ type ][ i ] );
|
99
|
+
}
|
100
|
+
}
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
// 2. Copy user data
|
105
|
+
if ( dataUser.hasData( src ) ) {
|
106
|
+
udataOld = dataUser.access( src );
|
107
|
+
udataCur = jQuery.extend( {}, udataOld );
|
108
|
+
|
109
|
+
dataUser.set( dest, udataCur );
|
110
|
+
}
|
111
|
+
}
|
112
|
+
|
113
|
+
// Fix IE bugs, see support tests
|
114
|
+
function fixInput( src, dest ) {
|
115
|
+
var nodeName = dest.nodeName.toLowerCase();
|
116
|
+
|
117
|
+
// Fails to persist the checked state of a cloned checkbox or radio button.
|
118
|
+
if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
|
119
|
+
dest.checked = src.checked;
|
120
|
+
|
121
|
+
// Fails to return the selected option to the default selected state when cloning options
|
122
|
+
} else if ( nodeName === "input" || nodeName === "textarea" ) {
|
123
|
+
dest.defaultValue = src.defaultValue;
|
124
|
+
}
|
125
|
+
}
|
126
|
+
|
127
|
+
function domManip( collection, args, callback, ignored ) {
|
128
|
+
|
129
|
+
// Flatten any nested arrays
|
130
|
+
args = concat.apply( [], args );
|
131
|
+
|
132
|
+
var fragment, first, scripts, hasScripts, node, doc,
|
133
|
+
i = 0,
|
134
|
+
l = collection.length,
|
135
|
+
iNoClone = l - 1,
|
136
|
+
value = args[ 0 ],
|
137
|
+
isFunction = jQuery.isFunction( value );
|
138
|
+
|
139
|
+
// We can't cloneNode fragments that contain checked, in WebKit
|
140
|
+
if ( isFunction ||
|
141
|
+
( l > 1 && typeof value === "string" &&
|
142
|
+
!support.checkClone && rchecked.test( value ) ) ) {
|
143
|
+
return collection.each( function( index ) {
|
144
|
+
var self = collection.eq( index );
|
145
|
+
if ( isFunction ) {
|
146
|
+
args[ 0 ] = value.call( this, index, self.html() );
|
147
|
+
}
|
148
|
+
domManip( self, args, callback, ignored );
|
149
|
+
} );
|
150
|
+
}
|
151
|
+
|
152
|
+
if ( l ) {
|
153
|
+
fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
|
154
|
+
first = fragment.firstChild;
|
155
|
+
|
156
|
+
if ( fragment.childNodes.length === 1 ) {
|
157
|
+
fragment = first;
|
158
|
+
}
|
159
|
+
|
160
|
+
// Require either new content or an interest in ignored elements to invoke the callback
|
161
|
+
if ( first || ignored ) {
|
162
|
+
scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
|
163
|
+
hasScripts = scripts.length;
|
164
|
+
|
165
|
+
// Use the original fragment for the last item
|
166
|
+
// instead of the first because it can end up
|
167
|
+
// being emptied incorrectly in certain situations (#8070).
|
168
|
+
for ( ; i < l; i++ ) {
|
169
|
+
node = fragment;
|
170
|
+
|
171
|
+
if ( i !== iNoClone ) {
|
172
|
+
node = jQuery.clone( node, true, true );
|
173
|
+
|
174
|
+
// Keep references to cloned scripts for later restoration
|
175
|
+
if ( hasScripts ) {
|
176
|
+
|
177
|
+
// Support: Android <=4.0 only, PhantomJS 1 only
|
178
|
+
// push.apply(_, arraylike) throws on ancient WebKit
|
179
|
+
jQuery.merge( scripts, getAll( node, "script" ) );
|
180
|
+
}
|
181
|
+
}
|
182
|
+
|
183
|
+
callback.call( collection[ i ], node, i );
|
184
|
+
}
|
185
|
+
|
186
|
+
if ( hasScripts ) {
|
187
|
+
doc = scripts[ scripts.length - 1 ].ownerDocument;
|
188
|
+
|
189
|
+
// Reenable scripts
|
190
|
+
jQuery.map( scripts, restoreScript );
|
191
|
+
|
192
|
+
// Evaluate executable scripts on first document insertion
|
193
|
+
for ( i = 0; i < hasScripts; i++ ) {
|
194
|
+
node = scripts[ i ];
|
195
|
+
if ( rscriptType.test( node.type || "" ) &&
|
196
|
+
!dataPriv.access( node, "globalEval" ) &&
|
197
|
+
jQuery.contains( doc, node ) ) {
|
198
|
+
|
199
|
+
if ( node.src ) {
|
200
|
+
|
201
|
+
// Optional AJAX dependency, but won't run scripts if not present
|
202
|
+
if ( jQuery._evalUrl ) {
|
203
|
+
jQuery._evalUrl( node.src );
|
204
|
+
}
|
205
|
+
} else {
|
206
|
+
DOMEval( node.textContent.replace( rcleanScript, "" ), doc );
|
207
|
+
}
|
208
|
+
}
|
209
|
+
}
|
210
|
+
}
|
211
|
+
}
|
212
|
+
}
|
213
|
+
|
214
|
+
return collection;
|
215
|
+
}
|
216
|
+
|
217
|
+
function remove( elem, selector, keepData ) {
|
218
|
+
var node,
|
219
|
+
nodes = selector ? jQuery.filter( selector, elem ) : elem,
|
220
|
+
i = 0;
|
221
|
+
|
222
|
+
for ( ; ( node = nodes[ i ] ) != null; i++ ) {
|
223
|
+
if ( !keepData && node.nodeType === 1 ) {
|
224
|
+
jQuery.cleanData( getAll( node ) );
|
225
|
+
}
|
226
|
+
|
227
|
+
if ( node.parentNode ) {
|
228
|
+
if ( keepData && jQuery.contains( node.ownerDocument, node ) ) {
|
229
|
+
setGlobalEval( getAll( node, "script" ) );
|
230
|
+
}
|
231
|
+
node.parentNode.removeChild( node );
|
232
|
+
}
|
233
|
+
}
|
234
|
+
|
235
|
+
return elem;
|
236
|
+
}
|
237
|
+
|
238
|
+
jQuery.extend( {
|
239
|
+
htmlPrefilter: function( html ) {
|
240
|
+
return html.replace( rxhtmlTag, "<$1></$2>" );
|
241
|
+
},
|
242
|
+
|
243
|
+
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
|
244
|
+
var i, l, srcElements, destElements,
|
245
|
+
clone = elem.cloneNode( true ),
|
246
|
+
inPage = jQuery.contains( elem.ownerDocument, elem );
|
247
|
+
|
248
|
+
// Fix IE cloning issues
|
249
|
+
if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
|
250
|
+
!jQuery.isXMLDoc( elem ) ) {
|
251
|
+
|
252
|
+
// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2
|
253
|
+
destElements = getAll( clone );
|
254
|
+
srcElements = getAll( elem );
|
255
|
+
|
256
|
+
for ( i = 0, l = srcElements.length; i < l; i++ ) {
|
257
|
+
fixInput( srcElements[ i ], destElements[ i ] );
|
258
|
+
}
|
259
|
+
}
|
260
|
+
|
261
|
+
// Copy the events from the original to the clone
|
262
|
+
if ( dataAndEvents ) {
|
263
|
+
if ( deepDataAndEvents ) {
|
264
|
+
srcElements = srcElements || getAll( elem );
|
265
|
+
destElements = destElements || getAll( clone );
|
266
|
+
|
267
|
+
for ( i = 0, l = srcElements.length; i < l; i++ ) {
|
268
|
+
cloneCopyEvent( srcElements[ i ], destElements[ i ] );
|
269
|
+
}
|
270
|
+
} else {
|
271
|
+
cloneCopyEvent( elem, clone );
|
272
|
+
}
|
273
|
+
}
|
274
|
+
|
275
|
+
// Preserve script evaluation history
|
276
|
+
destElements = getAll( clone, "script" );
|
277
|
+
if ( destElements.length > 0 ) {
|
278
|
+
setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
|
279
|
+
}
|
280
|
+
|
281
|
+
// Return the cloned set
|
282
|
+
return clone;
|
283
|
+
},
|
284
|
+
|
285
|
+
cleanData: function( elems ) {
|
286
|
+
var data, elem, type,
|
287
|
+
special = jQuery.event.special,
|
288
|
+
i = 0;
|
289
|
+
|
290
|
+
for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
|
291
|
+
if ( acceptData( elem ) ) {
|
292
|
+
if ( ( data = elem[ dataPriv.expando ] ) ) {
|
293
|
+
if ( data.events ) {
|
294
|
+
for ( type in data.events ) {
|
295
|
+
if ( special[ type ] ) {
|
296
|
+
jQuery.event.remove( elem, type );
|
297
|
+
|
298
|
+
// This is a shortcut to avoid jQuery.event.remove's overhead
|
299
|
+
} else {
|
300
|
+
jQuery.removeEvent( elem, type, data.handle );
|
301
|
+
}
|
302
|
+
}
|
303
|
+
}
|
304
|
+
|
305
|
+
// Support: Chrome <=35 - 45+
|
306
|
+
// Assign undefined instead of using delete, see Data#remove
|
307
|
+
elem[ dataPriv.expando ] = undefined;
|
308
|
+
}
|
309
|
+
if ( elem[ dataUser.expando ] ) {
|
310
|
+
|
311
|
+
// Support: Chrome <=35 - 45+
|
312
|
+
// Assign undefined instead of using delete, see Data#remove
|
313
|
+
elem[ dataUser.expando ] = undefined;
|
314
|
+
}
|
315
|
+
}
|
316
|
+
}
|
317
|
+
}
|
318
|
+
} );
|
319
|
+
|
320
|
+
jQuery.fn.extend( {
|
321
|
+
detach: function( selector ) {
|
322
|
+
return remove( this, selector, true );
|
323
|
+
},
|
324
|
+
|
325
|
+
remove: function( selector ) {
|
326
|
+
return remove( this, selector );
|
327
|
+
},
|
328
|
+
|
329
|
+
text: function( value ) {
|
330
|
+
return access( this, function( value ) {
|
331
|
+
return value === undefined ?
|
332
|
+
jQuery.text( this ) :
|
333
|
+
this.empty().each( function() {
|
334
|
+
if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
|
335
|
+
this.textContent = value;
|
336
|
+
}
|
337
|
+
} );
|
338
|
+
}, null, value, arguments.length );
|
339
|
+
},
|
340
|
+
|
341
|
+
append: function() {
|
342
|
+
return domManip( this, arguments, function( elem ) {
|
343
|
+
if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
|
344
|
+
var target = manipulationTarget( this, elem );
|
345
|
+
target.appendChild( elem );
|
346
|
+
}
|
347
|
+
} );
|
348
|
+
},
|
349
|
+
|
350
|
+
prepend: function() {
|
351
|
+
return domManip( this, arguments, function( elem ) {
|
352
|
+
if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
|
353
|
+
var target = manipulationTarget( this, elem );
|
354
|
+
target.insertBefore( elem, target.firstChild );
|
355
|
+
}
|
356
|
+
} );
|
357
|
+
},
|
358
|
+
|
359
|
+
before: function() {
|
360
|
+
return domManip( this, arguments, function( elem ) {
|
361
|
+
if ( this.parentNode ) {
|
362
|
+
this.parentNode.insertBefore( elem, this );
|
363
|
+
}
|
364
|
+
} );
|
365
|
+
},
|
366
|
+
|
367
|
+
after: function() {
|
368
|
+
return domManip( this, arguments, function( elem ) {
|
369
|
+
if ( this.parentNode ) {
|
370
|
+
this.parentNode.insertBefore( elem, this.nextSibling );
|
371
|
+
}
|
372
|
+
} );
|
373
|
+
},
|
374
|
+
|
375
|
+
empty: function() {
|
376
|
+
var elem,
|
377
|
+
i = 0;
|
378
|
+
|
379
|
+
for ( ; ( elem = this[ i ] ) != null; i++ ) {
|
380
|
+
if ( elem.nodeType === 1 ) {
|
381
|
+
|
382
|
+
// Prevent memory leaks
|
383
|
+
jQuery.cleanData( getAll( elem, false ) );
|
384
|
+
|
385
|
+
// Remove any remaining nodes
|
386
|
+
elem.textContent = "";
|
387
|
+
}
|
388
|
+
}
|
389
|
+
|
390
|
+
return this;
|
391
|
+
},
|
392
|
+
|
393
|
+
clone: function( dataAndEvents, deepDataAndEvents ) {
|
394
|
+
dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
|
395
|
+
deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
|
396
|
+
|
397
|
+
return this.map( function() {
|
398
|
+
return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
|
399
|
+
} );
|
400
|
+
},
|
401
|
+
|
402
|
+
html: function( value ) {
|
403
|
+
return access( this, function( value ) {
|
404
|
+
var elem = this[ 0 ] || {},
|
405
|
+
i = 0,
|
406
|
+
l = this.length;
|
407
|
+
|
408
|
+
if ( value === undefined && elem.nodeType === 1 ) {
|
409
|
+
return elem.innerHTML;
|
410
|
+
}
|
411
|
+
|
412
|
+
// See if we can take a shortcut and just use innerHTML
|
413
|
+
if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
|
414
|
+
!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
|
415
|
+
|
416
|
+
value = jQuery.htmlPrefilter( value );
|
417
|
+
|
418
|
+
try {
|
419
|
+
for ( ; i < l; i++ ) {
|
420
|
+
elem = this[ i ] || {};
|
421
|
+
|
422
|
+
// Remove element nodes and prevent memory leaks
|
423
|
+
if ( elem.nodeType === 1 ) {
|
424
|
+
jQuery.cleanData( getAll( elem, false ) );
|
425
|
+
elem.innerHTML = value;
|
426
|
+
}
|
427
|
+
}
|
428
|
+
|
429
|
+
elem = 0;
|
430
|
+
|
431
|
+
// If using innerHTML throws an exception, use the fallback method
|
432
|
+
} catch ( e ) {}
|
433
|
+
}
|
434
|
+
|
435
|
+
if ( elem ) {
|
436
|
+
this.empty().append( value );
|
437
|
+
}
|
438
|
+
}, null, value, arguments.length );
|
439
|
+
},
|
440
|
+
|
441
|
+
replaceWith: function() {
|
442
|
+
var ignored = [];
|
443
|
+
|
444
|
+
// Make the changes, replacing each non-ignored context element with the new content
|
445
|
+
return domManip( this, arguments, function( elem ) {
|
446
|
+
var parent = this.parentNode;
|
447
|
+
|
448
|
+
if ( jQuery.inArray( this, ignored ) < 0 ) {
|
449
|
+
jQuery.cleanData( getAll( this ) );
|
450
|
+
if ( parent ) {
|
451
|
+
parent.replaceChild( elem, this );
|
452
|
+
}
|
453
|
+
}
|
454
|
+
|
455
|
+
// Force callback invocation
|
456
|
+
}, ignored );
|
457
|
+
}
|
458
|
+
} );
|
459
|
+
|
460
|
+
jQuery.each( {
|
461
|
+
appendTo: "append",
|
462
|
+
prependTo: "prepend",
|
463
|
+
insertBefore: "before",
|
464
|
+
insertAfter: "after",
|
465
|
+
replaceAll: "replaceWith"
|
466
|
+
}, function( name, original ) {
|
467
|
+
jQuery.fn[ name ] = function( selector ) {
|
468
|
+
var elems,
|
469
|
+
ret = [],
|
470
|
+
insert = jQuery( selector ),
|
471
|
+
last = insert.length - 1,
|
472
|
+
i = 0;
|
473
|
+
|
474
|
+
for ( ; i <= last; i++ ) {
|
475
|
+
elems = i === last ? this : this.clone( true );
|
476
|
+
jQuery( insert[ i ] )[ original ]( elems );
|
477
|
+
|
478
|
+
// Support: Android <=4.0 only, PhantomJS 1 only
|
479
|
+
// .get() because push.apply(_, arraylike) throws on ancient WebKit
|
480
|
+
push.apply( ret, elems.get() );
|
481
|
+
}
|
482
|
+
|
483
|
+
return this.pushStack( ret );
|
484
|
+
};
|
485
|
+
} );
|
486
|
+
|
487
|
+
return jQuery;
|
488
|
+
} );
|