Mercurial > laserkard
comparison buy2.js @ 80:d913ee48d935 laserkard
first stab at js
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sun, 25 Jul 2010 03:11:26 -0400 |
parents | 343dc947f999 |
children | 6adb5da55d18 |
comparison
equal
deleted
inserted
replaced
79:343dc947f999 | 80:d913ee48d935 |
---|---|
1 | 1 |
2 var Buy = | |
3 (function (){ | |
4 | |
5 var order = | |
6 {color: "black", | |
7 style: "bold", | |
8 quantity: 30}; | |
9 | |
10 var raphe = undefined; | |
11 | |
12 var init = (function () { | |
13 $("#whatev").html("LAMBDA the ULTIMATE!!!"); | |
14 raphe = Raphael("card-display", 200 ,200);}); | |
15 | |
16 var drawRect = (function (){ | |
17 raphe.rect(1,1,50,50);}); | |
18 | |
19 var materials = | |
20 {green: "buy-images/green.png", | |
21 red: "buy-images/red.png", | |
22 blue: "buy-images/blue.png", | |
23 black: "buy-images/black.png"} | |
24 | |
25 return {init : init, | |
26 draw : drawRect}; | |
27 })(); | |
28 | |
29 | |
30 | |
31 $(document).ready(function() { | |
32 $("#color-select").html("Hello World"); | |
33 Buy.init(); | |
34 Buy.draw(); | |
35 | |
36 | |
37 }); | |
38 |