在Fancybox脚本中启用自定义格式

时间:2012-02-07 13:41:18

标签: javascript jquery fancybox

我在Fancybox脚本的末尾添加了以下代码,但它没有在图像下方显示“关闭”链接,也没有禁用默认的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
});

});

有什么想法吗?

0 个答案:

没有答案