jQuery 中的最基本代码 4句话

<script>
(function(){
 
var  
	jQuery = function( selector, context ) {
        return new jQuery.fn.init( );
    }; 	
 	
jQuery.fn = jQuery.prototype = {
	constructor: jQuery ,
	init:function(){},
	fx:function(){alert('这是类库的一个实例化方法[fx]');}
}; 
 
jQuery.fn.init.prototype = jQuery.fn;
window.__doll=  jQuery;		
})()
__doll().fx();


</script>

  

posted @ 2014-07-26 10:01  _snow  阅读(134)  评论(0编辑  收藏  举报