Reputation: 2887
I'm using Owl Carousel for Vue. It doesn't seem to work properly since all carousel items are visible in their global container, which is several screens wide (there's no overflow: hidden
or any max-width
to make only x items visible at a time).
Anyway I find myself forced to apply some container
class to a wrapper that the plugin generates dynamically. To that end I do:
mounted () {
this.$nextTick(() => {
document.querySelector('.owl-carousel').classList.add('container')
})
}
But, querySelector('.owl-carousel')
is null
although I see it in the DOM.
How can I successfully select it?
Upvotes: 3
Views: 277