| @@ 664-682 (lines=19) @@ | ||
| 661 | }, |
|
| 662 | ||
| 663 | // results is for internal usage only |
|
| 664 | makeArray: function( array, results ) { |
|
| 665 | var ret = results || []; |
|
| 666 | ||
| 667 | if ( array != null ) { |
|
| 668 | // The window, strings (and functions) also have 'length' |
|
| 669 | // The extra typeof function check is to prevent crashes |
|
| 670 | // in Safari 2 (See: #3039) |
|
| 671 | // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 |
|
| 672 | var type = jQuery.type(array); |
|
| 673 | ||
| 674 | if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { |
|
| 675 | push.call( ret, array ); |
|
| 676 | } else { |
|
| 677 | jQuery.merge( ret, array ); |
|
| 678 | } |
|
| 679 | } |
|
| 680 | ||
| 681 | return ret; |
|
| 682 | }, |
|
| 683 | ||
| 684 | inArray: function( elem, array ) { |
|
| 685 | if ( array.indexOf ) { |
|
| @@ 684-700 (lines=17) @@ | ||
| 681 | }, |
|
| 682 | ||
| 683 | // results is for internal usage only |
|
| 684 | makeArray: function( array, results ) { |
|
| 685 | var ret = results || []; |
|
| 686 | ||
| 687 | if ( array != null ) { |
|
| 688 | // The window, strings (and functions) also have 'length' |
|
| 689 | // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 |
|
| 690 | var type = jQuery.type( array ); |
|
| 691 | ||
| 692 | if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { |
|
| 693 | push.call( ret, array ); |
|
| 694 | } else { |
|
| 695 | jQuery.merge( ret, array ); |
|
| 696 | } |
|
| 697 | } |
|
| 698 | ||
| 699 | return ret; |
|
| 700 | }, |
|
| 701 | ||
| 702 | inArray: function( elem, array, i ) { |
|
| 703 | var len; |
|