test

by Alan Harris

HTML

<button id="cpu">CPU</button>


 <div class="column" id="output">
          
         
        </div>

CSS

#cpuTable {
  border: 1px solid black;
}

JavaScript

// client-side js
// run by the browser each time your view template is loaded
$(document).ready(function() {
  
});




var cpus = [{
  "Name" : "Intel core 2 quad Q6600",
  "NumofCores" : 4,
  "Socket" : "LGA 775",
  "Price" : 43,
  "freeShip" : "no",
  "placetobuy" : "Newegg",
  
  "link" : "https://www.newegg.com/Product/Product.aspx?Item=9SIA4RE7BC5551",
  "moboRequired" : ["LGA775"],
  "Selected" : false,
  
},
{
  "Name" : "Intel Xeon E5450",
  "NumofCores" : 2,
  "Socket" : "LGA 771(Can work in LGA775)",
  "Price" : 17.99,
  "freeShip" : "no",
  "placetobuy" : "Amazon",
  "link" : "https://www.amazon.com/Intel-Xeon-E5450-QUAD-CORE-1333MHz/dp/B004EET0CW",
  "moboRequired" : ["LGA771", "LGA775"],
  "Selected" : false,
},
{
  "Name" : "3.0 Ghz Intel core 2 duo E8400",
  "NumofCores" : 2,
  "Socket" : "LGA 775",
  
  "Price" : 34.95 + 4.52,
  "freeShip" : "no",
  "Selected" : false,
  "placetobuy" : "Amazon",
  "link" : "https://www.amazon.com/Intel-E8400-3-0GHz-Processor-EU80570PJ0806M/dp/B0019NKGR4",
  "moboRequired" : ["LGA775"],
  
}];


var vidcard = [{
  "Name" : "XFX RX 550 2G",
  "Price" : 100,
  "freeShip" : true,
 "placetobuy" : "Newegg",
  "link" : "https://www.newegg.com/Product/Product.aspx?Item=N82E16814150805&Tpk=N82E16814150805",
  "Selected" : false
}];


var mobo = [{
  "Brand" : "Gigabyte",
  "Model" : "G31M-ES2L",
  "Socket" : "LGA775",
  "memoryRequired" : "DDR2",
  "Price" : null,
  "Selected" : false,
  "placetobuy" : "Newegg",
  "link" : "https://www.newegg.com/Product/Product.aspx?Item=N82E16813128357"
},
            
{
  "Brand" : "MSI",
  "Model" : "MEG Z390 ACE",
  "Socket" : "LGA1151",
  "memoryRequired" : "DDR4",
  "Price" : 260,
  "Selected" : false,
  "placetobuy" : "Newegg", 
  "link" : "https://www.newegg.com/Product/Product.aspx?Item=13-144-210&cm_sp=Techmas-_-1209-1209-_-13-144-210-_-MysteryDeals"
  
}];


var cpuTable = "";

  //var cpuTable = $("<table/>").attr("id", "myTable");
   cpuTable += "<table>";
  
  cpuTable +=...