2017-08-24 30 views

回答

0

可以,例如,使用clickContent選項:

$('[data-fancybox]').fancybox({ 
    clickContent : function(current, event) { 
    return current.type === 'image' ? 'zoom' : 'close'; 
    } 
}); 

使用這個片段中,點擊圖像將放大,但其他內容 - 關閉。

Demo - https://codepen.io/anon/pen/WEKmoB