I am trying to create a photo gallery page that will be listing photos one by one. But i would like to have an anchor for each photos that when user clicks on next previous buttons it should slide to the next/previous photos accordingly by using the ID's values. Please Note: This is not something like a carousel or slider. Kindly go-through the below demo link.
How to achieve this function in jquery?
https://jsfiddle.net/2oqg9rpL/1/
<div class="photogallery_wrapper_nf">
<div class="next"><a href="#"><img src="images/up-chevron.png" /></a></div>
<div class="previous"><a href="#"><img src="images/down-chevron.png" /></a></div>
<div class="photogallery_item_nf_heading">
<h1>Hadeel Anwar wins Arab Reading Challenge 2019 </h1>
<p>Published on November 17, 2019 at 07.50 am</p>
</div>
<div class="vuukle_sharing_bar">
<img src="images/social-sharing.jpg" />
</div>
<div class="photogallery_item_nf" id="slide1">
<div class="photogallery_item_nf_img">
<img src="https://picsum.photos/1200/800/?random" />
</div>
<div class="photogallery_item_nf_caption">
<h3>Hadeel Anwar wins Arab Reading Challenge 2019 Hadeel Anwar wins Arab Reading Challenge 2019 Hadeel Anwar wins Arab Reading Challenge 2019 Hadeel Anwar wins Arab Reading Challenge 2019.</h3>
<h6>Photo by Juidin Bernarrd/KT </h6>
</div>
</div>
<div class="photogallery_item_nf" id="slide2">
<div class="photogallery_item_nf_img">
<img src="https://picsum.photos/1200/800/?random" />
</div>
<div class="photogallery_item_nf_caption">
<h3>Hadeel Anwar wins Arab Reading Challenge 2019 Hadeel Anwar wins Arab Reading Challenge 2019 Hadeel Anwar wins Arab Reading Challenge 2019 Hadeel Anwar wins Arab Reading Challenge 2019.</h3>
<h6>Photo by Juidin Bernarrd/KT </h6>
</div>
</div>
<div class="photogallery_item_nf" id="slide3">
<div class="photogallery_item_nf_img">
<img src="https://picsum.photos/1200/800/?random" />
</div>
<div class="photogallery_item_nf_caption">
<h3>Hadeel Anwar wins Arab Reading Challenge 2019 Hadeel Anwar wins Arab Reading Challenge 2019 Hadeel Anwar wins Arab Reading Challenge 2019 Hadeel Anwar wins Arab Reading Challenge 2019.</h3>
<h6>Photo by Juidin Bernarrd/KT </h6>
</div>
</div>
<div class="photogallery_item_nf" id="slide4">
<div class="photogallery_item_nf_img">
<img src="https://picsum.photos/1200/800/?random" />
</div>
<div class="photogallery_item_nf_caption">
<h3>Hadeel Anwar wins Arab Reading Challenge 2019 Hadeel Anwar wins Arab Reading Challenge 2019 Hadeel Anwar wins Arab Reading Challenge 2019 Hadeel Anwar wins Arab Reading Challenge 2019.</h3>
<h6>Photo by Juidin Bernarrd/KT </h6>
</div>
</div>
</div>