0
有真正的问题从活动循环幻灯片获取alt attr?我应该使用'opts'来得到这个吗?我不能得到幻灯片标题,ccle jQuery
欢迎光临!
$("div.backgroundImages").fadeIn(200).cycle({
fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
timeout: 0,
containerResize: false,
speed: '450',
height: '1000',
slideExpr: 'div.backgroundSlide',
next : 'div.backgroundImages',
before: onBefore,
after: onAfter
});
function onBefore(curr, next, opts){
}
function onAfter(curr, next, opts){
$('span.title').html(opts.currSlide.alt); // doesn't work?!
var cnt = 'Image ' + (opts.currSlide + 1) + ' of ' + opts.slideCount; // works
$('span.cnt').html(cnt);
}