0
|
1 //>>excludeStart("exclude", pragmas.exclude);
|
|
2 define([ "shoestring" ], function(){
|
|
3 //>>excludeEnd("exclude");
|
|
4
|
|
5 /**
|
|
6 * Find descendant elements of the current collection.
|
|
7 *
|
|
8 * @param {string} selector The selector used to find the children
|
|
9 * @return shoestring
|
|
10 * @this shoestring
|
|
11 */
|
|
12 shoestring.fn.find = function( selector ){
|
|
13 var ret = [],
|
|
14 finds;
|
|
15 this.each(function(){
|
|
16 //>>includeStart("development", pragmas.development);
|
|
17 try {
|
|
18 //>>includeEnd("development");
|
|
19 finds = this.querySelectorAll( selector );
|
|
20 //>>includeStart("development", pragmas.development);
|
|
21 } catch( e ) {
|
|
22 shoestring.error( 'queryselector', selector );
|
|
23 }
|
|
24 //>>includeEnd("development");
|
|
25
|
|
26 for( var i = 0, il = finds.length; i < il; i++ ){
|
|
27 ret = ret.concat( finds[i] );
|
|
28 }
|
|
29 });
|
|
30 return shoestring( ret );
|
|
31 };
|
|
32
|
|
33 //>>excludeStart("exclude", pragmas.exclude);
|
|
34 });
|
|
35 //>>excludeEnd("exclude");
|