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