当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - Enable custom formatting in Fancybox script

问题描述:

I added the following code to the end of Fancybox script, but it does not show 'Close' link below the image, nor disable default CloseButton.

$(document).ready(function() {

function formatTitle(title, currentArray, currentIndex, currentOpts) {

return '<div id="tip7-title"><span><a href="javascript:$.fancybox.close()">Close &#215;</a></span>' + ( title && title.length ? title : '' ) + '</div>';

}

$(".tip7").fancybox({

'showCloseButton' : false,

'titlePosition' : 'inside',

'titleFormat' : formatTitle

});

});

Any ideas?

分享给朋友:
您可能感兴趣的文章:
随机阅读: