aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKumar Priyansh <[email protected]>2019-06-03 05:29:48 +0530
committerKumar Priyansh <[email protected]>2019-06-03 05:29:48 +0530
commita56d810e0574e6ef10ee63637d7bdf9081cecafa (patch)
treeb864bed81274cb212fce0ef84e225f17a8355340
parentad6af6bc3604fb29151e192c5693885d69e0037f (diff)
downloadfirebase-ecommerce-a56d810e0574e6ef10ee63637d7bdf9081cecafa.tar.xz
firebase-ecommerce-a56d810e0574e6ef10ee63637d7bdf9081cecafa.zip
Changed Dashboard JS to display a single product.
This loads a custom URL for a single product but however does not display the required information till now. The next changes will contain the necessary additions.
-rw-r--r--shared/Dashboard.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/shared/Dashboard.js b/shared/Dashboard.js
index 2bec588..c995df8 100644
--- a/shared/Dashboard.js
+++ b/shared/Dashboard.js
@@ -40,7 +40,9 @@ $(document).ready(function(){
loadAllProducts()
}
function loadProduct (productid) {
- console.log(productid)
+ $.getJSON("../products.json", function(result){
+ $('#loader').append('<div class="productDetail"><div class="picture" style="background-image: url('+')"></div><div class="content"><h1>Title</h1><ul><li>Point 1</li><li>Point 2</li><li>Point 3</li><li>Point 4</li></ul><h3>$17.99</h3><button>Add to Cart</button></div></div>')
+ })
}
function showErrorDiv() {