Skip to content

Instantly share code, notes, and snippets.

@dalmaer
Created April 11, 2011 05:37
Show Gist options
  • Save dalmaer/913108 to your computer and use it in GitHub Desktop.
Save dalmaer/913108 to your computer and use it in GitHub Desktop.
Sample code for Ender
$.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