- 注册时间
- 2012-2-2
- 最后登录
- 2012-2-2
- 在线时间
- 0 小时
- 阅读权限
- 10
- 积分
- 0
- 帖子
- 1
- 精华
- 0
- UID
- 1721

|
tabs组件源码片段:
_tabify: function( init ) {
var self = this,
o = this.options,
fragmentId = /^#.+/; // Safari 2 reports '#' for an empty hash
this.list = this.element.find( "ol,ul" ).eq( 0 );
this.lis = $( " > li:has(a[href])", this.list );
this.anchors = this.lis.map(function() {
return $( "a", this )[ 0 ];
});
this.panels = $( [] );
疑惑在 panels初始化为什么要用 $([]);而不直接使用 []呢
var a= $([]); 返回的对象的确也是一个空数组,即 length为0,
但是 a里边还包含了 $ 所有的 属性, 为什么要这么搞呢!那些属性没有用的啊 |
|