根据当前组别获取页面中所有相同组别的对象这一步卡住了
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>lightbox开发</title>
<link rel="stylesheet" href="css/lightbox.css">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
</head>
<body>
<h1>1组图片</h1>
<div>
<img
data-role="lightbox"
data-source="images/1-1.jpg"
src="images/1-1.jpg"
data-group="group-1"
data-id="jiushi"
data-caption="俄罗斯"
width="100" height="100" alt="">
<img data-role="lightbox" data-source="images/1-1.jpg" src="images/1-2.jpg" data-group="group-1" data-id="dfadfa" data-caption="俄罗qerewqr斯" width="100" height="100" alt="">
<img data-role="lightbox" data-source="images/1-1.jpg" src="images/1-3.jpg" data-group="group-1" data-id="qerewqr" data-caption="eqrewr" width="100" height="100" alt="">
</div>
<h1>2组图片</h1>
<div>
<img
data-role="lightbox"
data-source="images/1-1.jpg"
src="images/1-4.jpg"
data-group="group-2"
data-id="jiushi"
data-caption="俄罗斯"
width="100" height="100" alt="">
<img data-role="lightbox" data-source="images/1-1.jpg" src="images/1-5.jpg" data-group="group-2" data-id="dfadfa" data-caption="俄罗qerewqr斯" width="100" height="100" alt="">
<img data-role="lightbox" data-source="images/1-1.jpg" src="images/1-6.jpg" data-group="group-2" data-id="qerewqr" data-caption="eqrewr" width="100" height="100" alt="">
</div>
<!-- 遮罩 -->
<!-- <div id="G-lightbox-mask"></div> -->
<!-- 弹出层 -->
<!-- <div id="G-lightbox-popup">
<div>
<span class="lightbox-btn lightbox-prev-btn lightbox-prev-btn-show"></span>
<img src="images/2-2.jpg" alt="" width="100%">
<span class="lightbox-btn lightbox-next-btn lightbox-next-btn-show"></span>
</div>
<div>
<div>
<p>图片标题</p>
<span>当前索引:1 of 4</span>
</div>
<span></span>
</div>
</div> -->
<script type="text/javascript">
$(function(){
var lightbox = new LightBox();
})
</script>
</body>
</html>