The Gallery is deprecated. No new Gallery components may be submitted, and modifying existing components is disabled. For more information please read the Gallery Deprecation blog post. This is a static snapshot of the Gallery for archive purposes.
See 1 more by this user. Created: 09/19/11
Last CDN Push: 03/23/12
Build Tag: gallery-2012.03.23-18-00
Project: YUI 3
License: YUI BSD
YUI Version: 3.4.1
Free for use.
- Setup prev,next arrows to move between items
Builds carousel from existing markup
<script src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>
YUI({
modules: {
"gallery-carousel-circular": {
fullpath : "../../../../yui3-gallery/build/gallery-carousel-circular/gallery-carousel-circular.js",
requires : ["substitute", "widget"]
}
}
}).use("gallery-carousel-circular", function (Y) {
var carousel = new Y.CircularCarousel({
srcNode: '#carousel',
contentBox: '#carousel',
boundingBox : '#carousel',
type : 'CircularCarousel'
});
carousel.render();
Y.one('.prev').on('click', function(){
Y.fire('carousel:goPrev');
});
Y.one('.next').on('click', function(){
Y.fire('carousel:goNext');
});
});
All code on this site is licensed under the BSD License unless stated otherwise.