你好 stackoverflow 社区。我正在使用 lightGallery 插件,并且在我的案例锚标记中使用外部类型的按钮运行它时遇到问题,你能建议我做错了什么,或者可能有任何其他方式让它正常工作。
HTML
<a href="fullscreen">Enter full screen view</a>
<div class="owl-carousel" id="selector1">
<div class="item" data-src="img/1.jpg" name="fullscreen"><img src="img/1.jpg">
</div>
JavaScript
$(document).ready(function() {
$("#lightgallery").lightGallery();
});
$('#selector1').lightGallery({
selector: '.item'
});
lightGallery 插件:http ://sachinchoolur.github.io/lightGallery/docs/#installation