Mohammed
Mohammed

Reputation: 334

How to move carousel item when click a button?

I am working with waterwheel carousel I want to call move function based on my button click

here is my code :

 function myFunction()
{
 $("#waterwheel-carousel-default").waterwheelCarousel().moveOnce(true);
}

It's give me an error

TypeError: 'undefined' is not a function (evaluating '$("#waterwheel-carousel-default").waterwheelCarousel().

Any one can help?

Upvotes: 2

Views: 1304

Answers (1)

Ahmed Assaf
Ahmed Assaf

Reputation: 601

In left button write this :

$("#waterwheel-carousel-default").find('.carousel-controls .carousel-prev').trigger('click');

In right button write this :

$("#waterwheel-carousel-default").find('.carousel-controls .carousel-next').trigger('click');

Try this.

Upvotes: 4

Related Questions