/* Template Name: Grenviro Monitoring Author: Themesbrand Website: https://Themesbrand.com/ Contact: Themesbrand@gmail.com File: apps-nft-explore init js */ var url="build/json/"; var allproductlist = ''; //mail list by json var getJSON = function (jsonurl, callback) { var xhr = new XMLHttpRequest(); xhr.open("GET", url + jsonurl, true); xhr.responseType = "json"; xhr.onload = function () { var status = xhr.status; if (status === 200) { callback(null, xhr.response); } else { callback(status, xhr.response); } }; xhr.send(); }; // get json getJSON("nft-explore-product-list.json", function (err, data) { if (err !== null) { console.log("Something went wrong: " + err); } else { allproductlist = data; loadProductData(allproductlist); } }); // load mail data function loadProductData(datas) { document.querySelector("#explorecard-list").innerHTML = ''; Array.from(datas).forEach(function (prodctData, index) { var likeBtn = prodctData.like ? "active" : ""; document.querySelector("#explorecard-list").innerHTML += '