css selector | WordPress.org

[ad_1]

Moderator
Jan Dembowski

(@jdembowski)

Forum Moderator and Brute Squad

Do not use short links in these forums, that has been abused in the past and is expanded when found. I have expanded yours into the link field.

Hello,

It is not possible attach the lightbox via custom selectors because the slider is building dynamically. You can try to add the following JS code to “ARI Fancy Lightbox -> Settings -> Advanced -> Custom JS code” parameter:

setTimeout(function() {

$('.slider').each(function(el, idx) {

var $slider = $(this);

var group = 'fancy-' + idx;

var $items = $('figure:not(.slick-cloned)', $slider);

$items.each(function() {

var $item = $(this);

var src = $item.find('img').data('src');

$item.attr('data-src', src);

$item.attr('data-fancybox', group);

});

$($items).fancybox();

});

}, 10);
  • This reply was modified 1 hour, 15 minutes ago by arisoft.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer