N
N
Noname2018-04-12 22:46:31
JavaScript
Noname, 2018-04-12 22:46:31

How to exclude images duplicated by Slick slider from photos in pop-up gallery?

Hello. The bottom line is this:
Slick slider clones each of the containers (albums) and, accordingly, in the pop-up, where I display all the photos from this container, I have not 8 photos, but 16. I

describe in more detail, because I VERY hope for help, I've been fiddling with this for half a day (((

This is how my albums with photos look like:
5acfb41491928151668023.jpeg
here is the code (expanded the code of one album .zk_liter_block_album, the rest are collapsed):
5acfb290cb350841486957.jpeg
I use slick to display 3 albums, and to see the rest you can click on the arrows.
to display all in the popup album images using the magnific popup plugin, an example of how they are displayed:
5acfb4425f674595213194.jpeg
it turns out that when you click on a picture or album name, a popup opens with all the pictures specifically in this album. in order to display ONLY photos of a specific album, I use this script to group the albums by the attribute data-group=""
5acfb35de2fa0728601226.jpeg

on the screen with a pop-up, you can see that the current photo is 1 out of 16, although there should be 8 of them, I have 8 attributes with the same data-group="1" and common class .zk_liter_item_img for all tags and in all other albums.
this is what the spectator shows, it
5acfb693c79a6287863145.jpeg
turns out slick clones my li-shki, probably for realism when swiping and scrolling, BUT I don’t need to display images of this clone ... please help me with this problem

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
tyzberd, 2018-04-12
@lina_grigorievna

my li-shki, probably for realism when swiping and flipping,

for cyclic scrolling.
Are you sure that when scrolling through the slides in a slick, you will not come across a block that you cannot click on, due to the fact that its data-group has been removed

N
Noname, 2018-04-12
@lina_grigorievna

Problem solvedaaaaaaaaaaaaaaaaaaaaaaaaaaa))))
if it is useful to someone:
select the desired parent, and I have a container with the .slick-cloned class, but I added everything for reliability, and delete the tag and the attribute by which it should be displayed in this album !!! Bingo))
$('.zk_liter_block_album.slick-slide.slick-cloned a').removeAttr("data-group");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question