Mercurial > nebulaweb3
comparison default/node_modules/shoestring/src/dom/children.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 //>>excludeStart("exclude", pragmas.exclude); | |
2 define([ "shoestring" ], function(){ | |
3 //>>excludeEnd("exclude"); | |
4 | |
5 /** | |
6 * Get the children of the current collection. | |
7 * @return shoestring | |
8 * @this shoestring | |
9 */ | |
10 shoestring.fn.children = function(){ | |
11 //>>includeStart("development", pragmas.development); | |
12 if( arguments.length > 0 ){ | |
13 shoestring.error( 'children-selector' ); | |
14 } | |
15 //>>includeEnd("development"); | |
16 var ret = [], | |
17 childs, | |
18 j; | |
19 this.each(function(){ | |
20 childs = this.children; | |
21 j = -1; | |
22 | |
23 while( j++ < childs.length-1 ){ | |
24 if( shoestring.inArray( childs[ j ], ret ) === -1 ){ | |
25 ret.push( childs[ j ] ); | |
26 } | |
27 } | |
28 }); | |
29 return shoestring(ret); | |
30 }; | |
31 | |
32 //>>excludeStart("exclude", pragmas.exclude); | |
33 }); | |
34 //>>excludeEnd("exclude"); |