Please can someone provide an example of how you can add or remove items.
Thanks,
Lewis
// appends an item to the end
$('.owl-carousel')
.owlCarousel('add', '<div>foo</div>')
.owlCarousel('update')
// adds an item before the first item
$('.owl-carousel')
.trigger('add.owl.carousel', [$('<div>bar</div>'), 0])
.trigger('refresh.owl.carousel')
// adds multiple items to the end during change
$('.owl-carousel').on('change.owl.carousel', function(e) {
if (!e.namespace) return
e.relatedTarget.add($('#foo'))
e.relatedTarget.add($('#bar'))
e.relatedTarget.update()
})
Related to #338.
Great, Thanks
// adds an item before the first item
$('.owl-carousel')
.trigger('add.owl.carousel', [$('bar'), 0])
.trigger('refresh.owl.carousel')
It adds front element and replaces the element at index 0
Most helpful comment
Related to #338.