Hello! I have a connected owl-carusel, I want it to display dynamically added products from the list widget, i.e. so that li is inserted into the div - how can this be done? Code quote
$(".add_to_cart_button").click(function() { $('.cart_list li').each(function() { $('#owl-example').append('<div>' + $(this).html() + '</div>'); }); });
/* Карусель */ <div class="container" id="carousel"> <h3>ДОБАВЛЕННЫЕ БЛЮДА</h3> <div id="owl-example" class="owl-carousel"> <div> <li>Товар 1</li> </div> <div> <li>Товар 2</li> </div> <div> <li>Товар 3</li> </div> <div> <li>Товар 4</li> </div> </div> </div> /* Виджет с корзиной */ <div class="widget_shopping_cart_content"> <ul class="cart_list product_list_widget "></ul> <!-- end product list --> </div>