我在使用 fancybox 插件时遇到问题,请检查我的代码。当您在 Firefox 中滚动图像时,您似乎需要单击屏幕,然后它是猿战神。
<script>
$(document).ready(function() {
$(".fancybox").fancybox({
openEffect : 'none',
closeEffect : 'none'
});
});
</script>
<script>
$.ajax({
url: "user-uploads-thumbnails",
success: function(data){
$(data).find("a:contains(.jpg)").each(function(){
// will loop through
var images = 'user-uploads-thumbnails/' + $(this).attr("href");
var linkimage = 'user-uploads/' + $(this).attr("href");
// back up $('<p><a href="' + linkimage + '"><img class="resizeme" src="' + images + '"></a></p>').appendTo('#content');
$('<p><a class="fancybox" href="' + linkimage + '" data-fancybox-group="gallery"><img class="resizeme" src="' + images + '"></a></p>').appendTo('#content');
});
}
});
//linkimage is user-uploads directory which contains the larger file for fancy box
//user-uploads-thumbnails is only so i can pull smaller images for the infite scroll
//<a href="user-uploads/"'linkimages'"/" >
</script>