(function (){
var $ = function (name, age, job){
return new $.prototype.init(name, age, job);
};
$.prototype = {
constructor: $, // pit
init: function (name, age, job){
this.name = name;
this.age = age;
this.job = job;
},
say: function (){
console.log(this.name);
},
read: function (){
console.log(this.age);
}
}
$.prototype.init.prototype = $.prototype;
return window.$ = $;
})();
var lucy = $('lucy', 19, 'java');
console.log(lucy);
-
Notifications
You must be signed in to change notification settings - Fork 0
luogeger/jquery
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
jquery the principles and mechanisms
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published