diff options
| author | Kumar Priyansh <[email protected]> | 2019-06-03 05:42:28 +0530 |
|---|---|---|
| committer | Kumar Priyansh <[email protected]> | 2019-06-03 05:42:28 +0530 |
| commit | 6b0736a3e456d1eb1ba3c565a67ad0e09dabe953 (patch) | |
| tree | 579b9dbd9b05989950924d28977204adfb116ac9 /shared | |
| parent | a56d810e0574e6ef10ee63637d7bdf9081cecafa (diff) | |
| download | firebase-ecommerce-6b0736a3e456d1eb1ba3c565a67ad0e09dabe953.tar.xz firebase-ecommerce-6b0736a3e456d1eb1ba3c565a67ad0e09dabe953.zip | |
Adjusted Grid Size for Single Product and Updated Dashboard JS for Displaying Single Product Correctly
Diffstat (limited to 'shared')
| -rw-r--r-- | shared/Dashboard.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/shared/Dashboard.js b/shared/Dashboard.js index c995df8..5fb42a0 100644 --- a/shared/Dashboard.js +++ b/shared/Dashboard.js @@ -41,7 +41,12 @@ $(document).ready(function(){ } function loadProduct (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>') + console.log(result[productid]) + str = ""; + for(i=0; i< Object.keys(result[productid].productDescription).length; i++) { + str += ('<li>' + result[productid].productDescription[i] + '</li>'); + } + $('#loader').append('<div class="productDetail"><div class="picture" style="background-image:url(\''+result[productid].ProductImageURL+'\');"></div><div class="content"><h1>'+result[productid].productName+'</h1><ul>'+str+'</ul><h3>$17.99</h3><button>Add to Cart</button></div></div>'); }) } function showErrorDiv() { |
