jQuery addClass example
Change class name on click in jQuery
JavaScript
$(document).on('click', 'button', addToCart)
var cart = {}
function addToCart(e) {
const currentProduct = $(e.currentTarget).closest('.product')
var articul = $(this).attr('data-art');
var color = $('.btn-color.active', currentProduct).text().trim()
var quantity = $('.quantity-input', currentProduct).val()
document.getElementById('modal-basket').innerHTML= Object.values(cart);
console.log(cart);
showMiniCart();
}