我无法运行插件 Lightgallery 哈希。我希望在同一页面上有两个画廊,单击一个按钮应该显示另一个。如果我没记错的话,插件应该这样做。
我添加了这个 HTML 结构:
<div id="hash">
<a href="img/img_port/reportage/img-1.jpg">
<img src="img/img_port/reportage/thumb-1.jpg" />
</a>
<a href="img/img_port/reportage/img-2.jpg">
<img src="img/img_port/reportage/thumb-2.jpg" />
</a>
<a href="img/img_port/reportage/img-3.jpg">
<img src="img/img_port/reportage/thumb-3.jpg" />
</a>
<a href="img/img_port/reportage/img-4.jpg">
<img src="img/img_port/reportage/thumb-4.jpg" />
</a>
<div id="hash2">
<a href="img/img_port/reportage/img-1.jpg">
<img src="img/img_port/reportage/thumb-1.jpg" />
</a>
<a href="img/img_port/reportage/img-2.jpg">
<img src="img/img_port/reportage/thumb-2.jpg" />
</a>
<a href="img/img_port/reportage/img-3.jpg">
<img src="img/img_port/reportage/thumb-3.jpg" />
</a>
<a href="img/img_port/reportage/img-4.jpg">
<img src="img/img_port/reportage/thumb-4.jpg" />
</a>
而这个Javascript:
<script type="text/javascript">
$(document).ready(function() {
$("#hash").lightGallery({
download: false,
counter: false,
hash: true;
galleryId: 1
});
$("#hash2").lightGallery({
download: false,
counter: false,
hash: true;
galleryId: 2
});
});
</script>
这是正确的还是有什么问题?