Tell me, please, what should be the logic of this process. There is a page with a gallery on which the photos are simply displayed as “tiles” and increase when clicked:
<li> <a href="ссылка на 2галерею" data-largesrc="большая картинка" data-title="1146" data-description=""> <img src="маленькая картинка"/> <p class="article">1146</p> </a> </li> 2 gallery is a more convenient viewing of huge images.
<li> <a href="#"> <img src="миниатюра" data-large="огромная картинка" data-description="1146" /></a> </li> In 1 gallery, when you click on a small picture, a window opens with a large picture (ala Google), and next to it is the link "view in gallery format". And when you click this link, you need to open the 2gallery already on the picture from which the transition was made, because there are a couple of hundred photos, and look for what you want in this heap is somehow not very good. ps: I do not ask to write code instead of me, tell me, please, in what way can this be done in general.