简单的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>
我一直收到这个错误: 未捕获的TypeError:无法读取未定义的属性“defaultView”
有人碰到这个或类似的东西吗?
答案 0 :(得分:0)