我有图像列表,我只显示3,但在第三个,我想调用将显示所有图像的lightgallery。任何建议我怎么能这样做?
<div id="sync2" class="owl-carousel">
@foreach($property_gallery as $key=>$property_image)
<div class="data-src="/storage/uploads/{{$property_image->path }}">
@if($key == 2)
<a class='firstImage' href="/storage/uploads/{{$property_image->path }}">
<div class="see_all_gallery">
<h4>SEE ALL {{ count($property_gallery) }} PHOTOS</h4>
<span>VIEW GALLERY <i class="fa fa-angle-right"></i></span>
</div>
@else
<a href="/storage/uploads/{{$property_image->path }}" onclick="javascript:doSomething();">
@endif
<img src="/storage/uploads/{{$property_image->path }}" alt="" />
</a>
</div>
@endforeach
</div>