我使用的是jQuery 1.6.2和Fancybox 1.3.4
当我调用下面的fancybox函数在iframe中加载html页面时,一切都加载得很好,没有错误:
$.fancybox({
'width' : '75%',
'height' : '75%',
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'iframe',
'href' : 'search.htm'
});
当我添加showCloseButton
选项时,一切都加载得很好,并且没有错误但是关闭按钮仍然显示:
$.fancybox({
'width' : '75%',
'height' : '75%',
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'iframe',
'href' : 'search.htm',
'showCloseButton' : 'false'
});
如何去掉角框?
哎呀,一出现StackOverflow语法高亮就看到了问题。false
$.fancybox({
'width' : '75%',
'height' : '75%',
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'iframe',
'href' : 'search.htm',
'showCloseButton' : false
});
我遇到了这个问题,尽管遵循文档出现在谷歌的第一个结果。
原来API变了,文档也过时了。参见v2文档:http://fancyapps.com/fancybox/文档
使用closeBtn
属性代替:
jQuery.fancybox({
closeBtn: false
});
try this:
showCloseButton:'hide'