Skip to content

Instantly share code, notes, and snippets.

@sjungling
Created June 10, 2013 16:46
Show Gist options
  • Save sjungling/5750319 to your computer and use it in GitHub Desktop.
Save sjungling/5750319 to your computer and use it in GitHub Desktop.
jQuery()(function($) {
var Animal, sam;
Animal = (function() {
Animal.prototype.options = {
foo: 'bar',
bar: 'baz'
};
function Animal(name, options) {
this.name = name;
this.options = options;
}
Animal.prototype.move = function(meters) {
return alert(this.name + (" moved " + meters + "m."));
};
return Animal;
})();
sam = new Animal("Sammy the Python");
return sam.move();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment