' + '
' + response.data[i].title + '
' + '
Delete' + '
' + '' + ''); msg += response.data[i].title + ", "; } } } msg = msg.trim(); msg = msg.substring(0, msg.length - 1); $(".float_massage form .textarea_d textarea").html(msg); for(let i = 0; i < $(".float_basket_content_form .delete").length; i++) { $(".float_basket_content_form .delete").eq(i).click(function() { formProducts = formProducts.filter(function(id) { return id !== $(".float_basket_content_form .delete").eq(i).attr("data-id"); }); localStorage.setItem("pid", formProducts); getBasket(formProducts); }); } } }, }); }