From 6b0736a3e456d1eb1ba3c565a67ad0e09dabe953 Mon Sep 17 00:00:00 2001 From: Kumar Priyansh Date: Mon, 3 Jun 2019 05:42:28 +0530 Subject: Adjusted Grid Size for Single Product and Updated Dashboard JS for Displaying Single Product Correctly --- shared/Dashboard.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'shared') 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('

Title

  • Point 1
  • Point 2
  • Point 3
  • Point 4

$17.99

') + console.log(result[productid]) + str = ""; + for(i=0; i< Object.keys(result[productid].productDescription).length; i++) { + str += ('
  • ' + result[productid].productDescription[i] + '
  • '); + } + $('#loader').append('

    '+result[productid].productName+'

      '+str+'

    $17.99

    '); }) } function showErrorDiv() { -- cgit v1.2.3