aboutsummaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorKumar Priyansh <[email protected]>2019-05-31 18:58:27 +0700
committerKumar Priyansh <[email protected]>2019-05-31 18:58:27 +0700
commit684da6bd690a99685e4ab408b565683d8bdfb3aa (patch)
tree04c9d9b2d5fbcee9859ace2afffce09dc6fcbe66 /shared
parent61b4ec96d8e2e321354f60d7459f910416cda4ce (diff)
downloadfirebase-ecommerce-684da6bd690a99685e4ab408b565683d8bdfb3aa.tar.xz
firebase-ecommerce-684da6bd690a99685e4ab408b565683d8bdfb3aa.zip
Updated Dashboard JS to Show Products on Homepage
Diffstat (limited to 'shared')
-rw-r--r--shared/Dashboard.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/shared/Dashboard.js b/shared/Dashboard.js
index 6bad7a0..6c9d7af 100644
--- a/shared/Dashboard.js
+++ b/shared/Dashboard.js
@@ -47,10 +47,11 @@ $(document).ready(function(){
}
function loadAllProducts() {
$.getJSON("../products.json", function(result){
+ console.log(result)
var size = (Object.keys(result).length)
for(i = 0; i < size ; i++)
{
- // $('#loader')
+ $('#loader').append('<div class="singleProduct"><div class="productImage" style="background-image: url(\''+result[i].ProductImageURL+'\');"></div><h3 class="productTitle">'+result[i].productName+'</h3><h5 class="productPrice">$'+result[i].productPrice+'</h5><a href="index.html?productid='+result[i].productId+'">View Product</a></div>')
}
});
}