From 3d879183c124999d963ae702ca7082a105790f1c Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Fri, 25 Mar 2011 00:08:23 -0400 Subject: [PATCH] Added initial class example --- scripts/ex/class.js | 14 ++++++++++++++ scripts/ui.js | 11 ++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 scripts/ex/class.js diff --git a/scripts/ex/class.js b/scripts/ex/class.js new file mode 100644 index 0000000..2ad90b7 --- /dev/null +++ b/scripts/ex/class.js @@ -0,0 +1,14 @@ +/** + * Basic class declaration example + */ + +var Dog = Class( 'Dog', +{ + 'public bark': function() + { + console.log( 'Woof!' ); + } +} ); + +Dog().bark(); + diff --git a/scripts/ui.js b/scripts/ui.js index 94bd016..6644cea 100644 --- a/scripts/ui.js +++ b/scripts/ui.js @@ -61,6 +61,13 @@ return $trybox || ( function createTryBox() { + $txt = $( '