Bootstrap网格的图像超链接问题



我试图把一个网格的图像与引导(目前只有一个图像)的个人网站。网格上升得很好,但当图像被点击时,页面试图创建一个预览或其他东西,并显示这个警告:点击链接,还不能发布图片

文字本身"是指向所需页面的可点击超链接。这是html

<div id="portfolio">
<div class="container-fluid p-0">
<div class="row justify-content-center no-gutters">
<div class="col-lg-4 col-sm-6">
<a href="#"><img class="img-fluid" src="assets/img/portfolio/thumbnails/image.png" alt="" /></a>
</div>
</div>
</div>
</div>

www.trenty.net的代码中,问题来自magnific-popup库的以下代码

$('#portfolio').magnificPopup({
delegate: 'a:not(.portfolio-box)', // <= FIX HERE - adapt selector to not select your element
type: 'image',
tLoading: 'Loading image #%curr%...',
mainClass: 'mfp-img-mobile',
gallery: {
enabled: true,
navigateByImgClick: true,
preload: [0, 1]
},
image: {
tError: '<a href="%url%">The image #%curr%</a> could not be loaded.'
}
});

当你点击#portfolio元素的所有a标签时,它将变成预览弹出。

这可以通过删除这个JavaScript或调整它(像上面一样)来排除你的元素,你不希望它打开一个预览弹出

最新更新