jQuery学习笔记之jQuery原型属性和方法
jQuery.fn=jQuery.prototype={
constructor:jQuery,
init:function(selector,context,rootjQuery){},
selector:"",
jquery:"1.7.2",
length:0,
size:function(){},
toArray:function(){},
get:function(num){},
pushStack:function(elems,name,selector){},
each:function(callback,args){},
ready:function(fn){},
eq:function(i){},
first:function(){},
last:function(){},
slice:function(){},
map:function(callback){},
end:function(){},
push:push,
sort:[].sort,
splice:[].splice
};
以上就是该版本的jQuery的原型上的部分属性和方法.
selector:用于记录init参数的selector.但不一定是相等的.
$("div").selector;//"div"
$("div").find(p).selecctor;//"divp";
这个属性一般用于调试.
jquery:jQuery的版本号.
length:元素的个数.
size():等效于length,length的内存开销更小.
剩下的成员在后面的章节中介绍.