追加了Jquery,但未在Mobile中显示

时间:2018-11-10 17:42:16

标签: javascript jquery append

  

附加功能在计算机上工作正常,但在电话上仅附加但不显示列表

     

我的代码jQuery

if (decodeURIComponent(getCookie("sp")) != null && decodeURIComponent(getCookie("sp")) != "" && decodeURIComponent(getCookie("sp")) != "{}") {
            var temp = JSON.parse(decodeURIComponent(getCookie("sp"))), quantity = 0,item="";
            for (var item in temp) {
                quantity++;
                var item_cart = '<li><div class="img-product"><img src="' + temp[item]["Img"] + '" alt=""/></div><div class="info-product"><div class="name">' + temp[item]["Name"] + '</div><div class="price"><span>1 </span><span> x </span><span class="item-price-cart">' + parseInt(temp[item]["Price"]).toLocaleString(undefined, { minimumFractionDigits: 0 }) + ' VNĐ</span></div></div><div class="clearfix"></div><span class="delete" id="remove_' + temp[item]["ID"] + '">x</span></li>';
                item += item_cart;
                $(".list-cart").append(item_cart);
            }
            $(".quanlity-cart").text(quantity);
            var price_cart = 0;
            $(".item-price-cart").each(function () {
                price_cart += parseInt($(this).text().replace(" VNĐ", "").replace(".", "").replace(".", ""));
            });
            document.getElementById("total-price").innerText = price_cart.toLocaleString(undefined, { minimumFractionDigits: 0 }) + " VNĐ";
            $(".total-price").text(price_cart.toLocaleString(undefined, { minimumFractionDigits: 0 }) + " VNĐ");
        }
  

该站点遇到该错误。 (在购物车中打印列表购物车项目)https://obu.vn/Cart.aspx。帮我!请!!!

0 个答案:

没有答案