我在Fancybox脚本的末尾添加了以下代码,但它没有在图像下方显示“关闭”链接,也没有禁用默认的CloseButton。
$(document).ready(function() {
function formatTitle(title, currentArray, currentIndex, currentOpts) {
return '<div id="tip7-title"><span><a href="javascript:$.fancybox.close()">Close ×</a></span>' + ( title && title.length ? title : '' ) + '</div>';
}
$(".tip7").fancybox({
'showCloseButton' : false,
'titlePosition' : 'inside',
'titleFormat' : formatTitle
});
});
有什么想法吗?