aboutsummaryrefslogtreecommitdiffstats
path: root/src/manipulation.js
diff options
context:
space:
mode:
authorOleg <markelog@gmail.com>2012-12-20 21:06:06 +0400
committerOleg <markelog@gmail.com>2012-12-24 03:04:19 +0400
commitd41ac85ca3773f1be5dd91d59060fc064ac22673 (patch)
tree0a7f932ef7b317a04ba7b8c525e937c1c24bbea3 /src/manipulation.js
parent3c1b42805df4f932bcd49e5140c5e8b320ee2984 (diff)
downloadjquery-d41ac85ca3773f1be5dd91d59060fc064ac22673.tar.gz
jquery-d41ac85ca3773f1be5dd91d59060fc064ac22673.zip
Save one byte
Diffstat (limited to 'src/manipulation.js')
-rw-r--r--src/manipulation.js40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/manipulation.js b/src/manipulation.js
index 79ef956ac..f24f1e9b1 100644
--- a/src/manipulation.js
+++ b/src/manipulation.js
@@ -592,6 +592,26 @@ function cloneCopyEvent( src, dest ) {
}
}
+function getAll( context, tag ) {
+ var elems, elem,
+ i = 0,
+ ret = typeof context.getElementsByTagName !== "undefined" ? context.getElementsByTagName( tag || "*" ) :
+ typeof context.querySelectorAll !== "undefined" ? context.querySelectorAll( tag || "*" ) :
+ undefined;
+
+ if ( !ret ) {
+ for ( ret = [], elems = context.childNodes || context; (elem = elems[ i ]) != null; i++ ) {
+ core_push.apply( ret, !tag || jQuery.nodeName( elem, tag ) ?
+ getAll( elem, tag ) :
+ elems );
+ }
+ }
+
+ return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
+ jQuery.merge( [ context ], ret ) :
+ ret;
+}
+
function fixCloneNodeIssues( src, dest ) {
var nodeName;
@@ -625,23 +645,3 @@ function fixCloneNodeIssues( src, dest ) {
dest.defaultValue = src.defaultValue;
}
}
-
-function getAll( context, tag ) {
- var elems, elem,
- i = 0,
- ret = typeof context.getElementsByTagName !== "undefined" ? context.getElementsByTagName( tag || "*" ) :
- typeof context.querySelectorAll !== "undefined" ? context.querySelectorAll( tag || "*" ) :
- undefined;
-
- if ( !ret ) {
- for ( ret = [], elems = context.childNodes || context; (elem = elems[ i ]) != null; i++ ) {
- core_push.apply( ret, !tag || jQuery.nodeName( elem, tag ) ?
- getAll( elem, tag ) :
- elems );
- }
- }
-
- return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
- jQuery.merge( [ context ], ret ) :
- ret;
-}