留言板
aui carousel pause options
How to set pause aui carousel at default in following
AUI().use(
'aui-carousel','aui-dialog','aui-dialog-iframe',
function(Y) {
new Y.Carousel(
{
contentBox: '#myCarousel',
modal: true,
activeIndex: 2,
height: 250,
width: 250,
}
).render();
}
);
AUI().use(
'aui-carousel','aui-dialog','aui-dialog-iframe',
function(Y) {
new Y.Carousel(
{
contentBox: '#myCarousel',
modal: true,
activeIndex: 2,
height: 250,
width: 250,
}
).render();
}
);
Refer http://alloyui.com/api/classes/A.Carousel.html
It shows it has attribute called pauseOnHover.
Its better to provide proper information about issue and options tried.
It shows it has attribute called pauseOnHover.
Its better to provide proper information about issue and options tried.
Pankaj Kathiriya:
Refer http://alloyui.com/api/classes/A.Carousel.html
It shows it has attribute called pauseOnHover.
Its better to provide proper information about issue and options tried.
But I need pause option as default when opening the carousel
Kyle Joseph Stiemann,修改在6 年前。
RE: aui carousel pause options
Liferay Master 帖子: 760 加入日期: 13-1-14 最近的帖子
Hi Madasamy,
You can pause the Carousel initially by setting the playing attribute to false:
AUI().use(
'aui-carousel','aui-dialog','aui-dialog-iframe',
function(Y) {
new Y.Carousel({
contentBox: '#myCarousel',
modal: true,
activeIndex: 2,
height: 250,
width: 250,
playing: false
}).render();
});
- Kyle
You can pause the Carousel initially by setting the playing attribute to false:
AUI().use(
'aui-carousel','aui-dialog','aui-dialog-iframe',
function(Y) {
new Y.Carousel({
contentBox: '#myCarousel',
modal: true,
activeIndex: 2,
height: 250,
width: 250,
playing: false
}).render();
});
- Kyle
Thank you Kyle
It works perfectly , and I need another one
Is it possible to set activeIndex for carousel in javascript for same div ("#myCarousel")??
It works perfectly , and I need another one
Is it possible to set activeIndex for carousel in javascript for same div ("#myCarousel")??
Kyle Joseph Stiemann,修改在6 年前。
RE: aui carousel pause options
Liferay Master 帖子: 760 加入日期: 13-1-14 最近的帖子
Glad it's working for you!
You can set the active carousel item by calling Carousel.item(index) on your carousel instance. For example:
carousel.item(2); // Selects the third option.
- Kyle
You can set the active carousel item by calling Carousel.item(index) on your carousel instance. For example:
carousel.item(2); // Selects the third option.
- Kyle