Quantcast
Viewing all articles
Browse latest Browse all 28

AutoPlay on YUI3 Carousel

Hi Gopal,

I wonder if you could help; I can't seem to get AutoPlay to work on my YUI3 carousel. I have the following code:

Code:
YUI({gallery: 'gallery-2011.03.23-22-20'}).use("gallery-carousel", "substitute", "gallery-carousel-anim",  function (Y) {
   Y.on("contentready", function () {
      var carousel = new Y.Carousel({
         boundingBox: "#gallery-carousel",
         numVisible: 1,
         autoPlayInterval: 5000,
         isCircular: true,
         contentBox: "#gallery-carousel > ul"
      });

      carousel.plug(Y.CarouselAnimPlugin, { animation: { speed: 0.2, effect: Y.Easing.easeOut } });
      carousel.render();
      carousel.startAutoPlay();
   }, "#footer");
});


The console tells me that carousel.startAutoPlay is not a function, however, this worked in my YUI2 version of the carousel.
I'd appreciate any help.
Thanks

Viewing all articles
Browse latest Browse all 28

Trending Articles