- MooTools 1.2 Beginner's Guide
- Jacob Gube Garrick Cheung
- 88字
- 2025-03-31 06:30:58
Time for action—giving our class instance some custom options
Let's give some custom options to our class by deploying the following:
- Go back to the source code of the HTML document you just created. Go to the
var myDog = new Dog({ })
; line. - Pass property values to name, type, and age like so:
var myDog = new Dog({ name : 'Zensis', type : 'German Sheperd', age : 10 });
- Open your HTML document in the web browser, and now, you should see something like this: