单击图像后图像不断消失。
HTML
<div class="container">
<section id="picture-container">
<div class="picture-box">
<a href="gallery/img1.JPG" class="fancybox" rel="group"><img src="gallery/small-images/img1.JPG"></a>
</div>
<div class="picture-box">
<a href="gallery/img2.JPG" class="fancybox" rel="group"><img src="gallery/small-images/img2.JPG"></a>
</div>
</section>
</div> <!-- /container -->
的JavaScript
<script src="scripts/jquery.fancybox.js"></script>
<script type="text/javascript" src="/scripts/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>
<script type="text/javascript" src="/scripts/helpers/jquery.fancybox-media.js?v=1.0.5"></script>
<link rel="stylesheet" href="/scripts/helpers/jquery.fancybox-thumbs.css?v=1.0.7" type="text/css" media="screen" />
<script type="text/javascript" src="/scripts/helpers/jquery.fancybox-thumbs.js?v=1.0.7"></script>
<script>
$(document).ready(function() {
context = $('#picture-container');
$("a.fancybox", context).fancybox();
});
</script>