// $(".popular").hide(); $(document).on("click", ".article__readMore", function (event) { $('.article__contexts_cases').css('height', 'auto'); $('.article__readMore').hide(); }); $(document).on("click", ".likeSee__state__filter--item", function (event) { // $(".CaseNews").toggle(); // $(".popular").toggle(); $(".likeSee__state__filter--item").removeClass('active'); $(this).addClass("active"); }); const urlParams = new URLSearchParams(window.location.search); let id = urlParams.get('cid'); console.log(id); var datahref = String(window.location.href); var datahref2 = "http://127.0.0.1:5501/cases.html/"; console.log(datahref2); let posit = datahref2.indexOf("d"); if (posit == -1) { console.log('沒有d'); } else { console.log('有d'); } function get_data() { // var desid2=String(desid); // console.log(desid2); // $("#version").val(desid); // $("#version").html(desid); $.ajax({ method: "GET", // url: `json/cases-${id}.json`, // url:`json/cases.json`, url: `https://m3.hhh.com.tw:18686/gencase?id=${id}&sort=new&page=1`, dataType: "json", }) .done(function (msg) { console.log(msg); let designersinfo = ""; let CaseInfo = ""; let CaseInfo_mb = ""; let CaseTag = ""; let CaseData = ""; let CaseNews = ""; let CasePopular = ""; let CaseDetail = ""; let CasePageTitle = ""; let CaseImgQuantity = ""; let article__contexts = ""; let CaseCoverImg = ""; for (let i = 0; i < msg.length; i++) { CaseCoverImg = `
` designersinfo = `${msg[i].Casedescription}