• Resolved Erfan MHDi

    (@erfanmhd)


    hello,

    im using trying to programmatically run fancybox light box on woocommerce product variation gallery which is generating by another plugin once user selects a variant like below:

    var $slider = $(this);
    var $items = $('.woocommerce-product-gallery__image a', $slider);
    $items.each(function() {
    	var $item = $(this);
    	var src = $item.find('img').data('src');
    	$item.addClass('ari-fancybox');
    	$item.attr('data-type', 'image');
    	$item.attr('data-fancybox', 'woogallery_' + idx);
    	$item.attr('data-src', src);
    });
    $($items).fancybox();

    it works but the only problem is that light box for variation gallery is different than simple products gallery.

    i think somewhere inside ‘$($items).fancybox()’ i have to define the settings of light box like Animation effect, Animation Speed, Loop navigation, etc…

    as i couldn’t find any documentation regarding this issue, i’d appreciate any help.

    Thanks in Advance.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘FancyBox API’ is closed to new replies.