• Resolved olapersson

    (@olapersson)


    Modified the JS code a bit to get several galleries working at once.

    Stopped the autoplay slideshow as well, thou that is personal preference.

    Might be worth including the modified code in the plugin.

    (function ($) {
        var $slideshows = $('div.gallery-to-slideshow');
        if ($slideshows.length > 0 && typeof ($.fn.flexslider) !== 'undefined') {
            $slideshows.append('<ul class="pager"></ul>');
    
            $slideshows.each(function(){
    		 	 		$('.slides li', $(this)).each(function (index) {
         	       var $append = $(this).clone().removeAttr('style').addClass('thumb').find('p').remove().end();
         	       $('.pager', $(this).closest('.gallery-to-slideshow')).append($append).click(function (e) {
         	           e.preventDefault();
         	       });
         	   	});
    
    				});
    
            $slideshows.flexslider({
                animation: 'fade',
    						slideshow:false,
                slideDirection: 'horizontal',
                controlNav: false,
                keyboardNav: false,
                directionNav: false,
                manualControls: $('.pager li a img', $(this)),
                start: function (slider) {
    								console.log( $( $(slider) ) );
                    $('.pager li', $(slider)).eq(slider.currentSlide).addClass('active').end().find('a').click(function (e) {
                        e.preventDefault();
                        slider.flexAnimate($(this).parent().index());
                    });
                },
                after: function (slider) {
                    $('.pager li', $(slider)).removeClass('active').eq(slider.currentSlide).addClass('active');
                }
            });
        }
    })(jQuery);

    http://ww.wp.xz.cn/extend/plugins/gallery-to-slideshow/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Gallery to Slideshow] Fix for multiple slideshows’ is closed to new replies.