简单的 Fancybox 实现:
<!-- Add fancyBox -->
<link rel="stylesheet" href="<?php echo $path ?>/scripts/fancybox/source/jquery.fancybox.css?v=2.0.6" type="text/css" media="screen" />
<script type="text/javascript" src="<?php echo $path ?>/scripts/fancybox/source/jquery.fancybox.pack.js?v=2.0.6"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".bte-banner").fancybox({
maxWidth : 400,
maxHeight : 500,
fitToView : false,
width : 400,
height : 500,
autoSize : false,
closeClick : false,
openEffect : 'fade',
closeEffect : 'fade',
type : 'iframe'
});
});
</script>
...
<a class="bte-banner" href="pages/products/"><img src="images/banners/imagename.png"></a>
我不断收到此错误:未捕获的类型错误:无法读取未定义的属性“defaultView”
有人遇到这个或类似的东西吗?