Append Jquery was appended but not show in Mobile
up vote
0
down vote
favorite
The append function works fine on the computer but on the phone it appends only but does not display the list
My Code 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Đ");
The site encountered that error. (Print list cart item in the cart) https://obu.vn/Cart.aspx . Help me! Please !!!
javascript jquery append
add a comment |
up vote
0
down vote
favorite
The append function works fine on the computer but on the phone it appends only but does not display the list
My Code 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Đ");
The site encountered that error. (Print list cart item in the cart) https://obu.vn/Cart.aspx . Help me! Please !!!
javascript jquery append
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
The append function works fine on the computer but on the phone it appends only but does not display the list
My Code 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Đ");
The site encountered that error. (Print list cart item in the cart) https://obu.vn/Cart.aspx . Help me! Please !!!
javascript jquery append
The append function works fine on the computer but on the phone it appends only but does not display the list
My Code 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Đ");
The site encountered that error. (Print list cart item in the cart) https://obu.vn/Cart.aspx . Help me! Please !!!
javascript jquery append
javascript jquery append
asked Nov 10 at 17:42
Long Hoàng Nguyễn
557
557
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53241700%2fappend-jquery-was-appended-but-not-show-in-mobile%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown