diff 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
line wrap: on
line diff
     1.1 --- a/buy2.js	Sun Jul 25 01:33:22 2010 -0400
     1.2 +++ b/buy2.js	Sun Jul 25 03:11:26 2010 -0400
     1.3 @@ -1,1 +1,38 @@
     1.4  
     1.5 +var Buy = 
     1.6 +(function (){ 
     1.7 +
     1.8 +    var order = 
     1.9 +    {color: "black",
    1.10 +     style: "bold",
    1.11 +     quantity: 30};
    1.12 +    
    1.13 +    var raphe = undefined;
    1.14 +    
    1.15 +    var init = (function () {
    1.16 +	    $("#whatev").html("LAMBDA the ULTIMATE!!!");
    1.17 +	    raphe = Raphael("card-display", 200 ,200);});
    1.18 +    
    1.19 +    var drawRect = (function (){
    1.20 +	    raphe.rect(1,1,50,50);});
    1.21 +    
    1.22 +    var materials = 
    1.23 +    {green: "buy-images/green.png",
    1.24 +     red:   "buy-images/red.png",
    1.25 +     blue:  "buy-images/blue.png",
    1.26 +     black: "buy-images/black.png"}
    1.27 +    
    1.28 +    return {init : init,
    1.29 +	    draw : drawRect};
    1.30 +})();
    1.31 +
    1.32 +
    1.33 +
    1.34 +$(document).ready(function() {
    1.35 +	$("#color-select").html("Hello World");
    1.36 +	Buy.init();
    1.37 +	Buy.draw();
    1.38 +
    1.39 +	
    1.40 +    });
    1.41 +