jquery 源码初探,一步步实现自己的jquery(一)
最近稍微看了一下jquery的源码(1.4.2),大致上看,源码都包含在下面的代码中
jQuery.fn = jQuery.prototype={ // Start with an empty selectorselector: "",// The current version of jQuery being usedjquery: "1.4.2",// The default length of a jQuery object is 0length: 0,// The number of elements contained in the matched element setsize: function() {return this.length;},toArray: function() {return slice.call( this, 0 );},…… }