Sumana Mohan![]()
- 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');
});
});
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info