Hello! I have a nose to poke my nose why the hide () function does not work for me. thank.
function addToCart(itemId){ console.log("js - addToCart"); $.ajax({ type: 'POST', async: false, url: "/cart/addtocart/" + itemId + '/', dataType: 'json', succes: function (data){ if (data['success']){ $("#cartCntItems").html(data['cntItem']); $("#addCart_"+itemId).hide(); $("#removeCart_"+itemId).show(); } } }); }
"#addCart_"+itemId- lampajsonformat. What does the browser debugger say? Insertconsole.login thedata['success']condition - lampa