Created
April 11, 2011 05:37
-
-
Save dalmaer/913108 to your computer and use it in GitHub Desktop.
Sample code for Ender
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.script(['mod1.js', 'mod2.js'], 'base', function () { | |
| // script is ready | |
| }); | |
| // event driven. listen for 'base' files to load | |
| $.script.ready('base', function () { | |
| }); | |
| $('p').animate({ | |
| opacity: 1, | |
| width: 200, | |
| duration: 1000, | |
| after: function () { | |
| console.log('done!'); | |
| } | |
| }); | |
| $.uniq(['a', 'b', 'b', 'c', 'a']); // => ['a', 'b', 'c'] | |
| var Person = $.klass(function (name) { | |
| this.name = name; | |
| }) | |
| .methods({{ | |
| walk: function () {} | |
| }); | |
| var SuperHuman = Person.extend({ | |
| walk: function () { | |
| this.supr(); | |
| this.fly(); | |
| }, | |
| fly: function () {} | |
| }); | |
| (new SuperHuman('bob')).walk(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment