2
我现在用的fancybox与下面的代码我怎么打开的fancybox使用图像
$("a[rel=Fancy" + UserId + "].Items").fancybox({ 'autoscale': 'false',
'cyclic': true,
'transitionIn': 'elastic',
'transitionOut': 'elastic',
'titlePosition': 'over',
'titleFormat': function(title, currentArray, currentIndex, currentOpts) {
return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + '/' + currentArray.length + (title.length ? ' ' + title : '') + '</span>';
}
});
$("a[rel=Fancy" + UserId + "].Items:first").click();
它打开的fancybox
的具体指标,但它开始表示从第1索引图像。我想开始的fancybox,用户会点击图片...
我如何给在的fancybox的指数?
如何将你的指数?你的点击事件处理程序在哪里? – 2013-04-26 11:55:11
你不需要通过任何'index',将的fancybox刚打开链接的'href'设定的目标图像,你点击,除非你有这样的修改默认行为的处理程序。 – JFK 2013-04-26 15:42:18
我有同样的问题,因为我绕过点击事件在我的移动应用程序! – 2015-04-07 14:50:17