Today marks my first question here and I'm excited! Can anyone guide me on how to implement sliding on click element with Vue-Carousel?
I want to slide to the right with just a single click on my input button. Here's the code snippet I have based on the documentation:
<carousel id="demo_carousel">
<slide class="slides_demo">
<input type="button" @click="getNextPage()" value="Go" />
</slide>
<slide class="slides_demo">
<p>This is next page</p>
</slide>
</carousel>
Below is the function I've implemented:
methods: {
getNextPage:function() {
if (this.currentPage < this.pageCount - 1) {
return this.currentPage + 1;
}
return this.loop ? 0 : this.currentPage;
}
}
However, the sliding action doesn't seem to be triggered. Any idea what could be wrong? Do I need to create a custom function?
Refer to Vue-Carousel documentation for more details: (https://github.com/SSENSE/vue-carousel)
Thank you in advance for your assistance :)