Connecting thumbnails to images extracted using php

前端 未结 1 1096
礼貌的吻别
礼貌的吻别 2020-12-22 01:52

I have a slider (flexslider) that i\'m using to display images in the form shown in the below jsfiddle... I optimized the slider so that it extracts images (which are named

相关标签:
1条回答
  • 2020-12-22 02:04

    You have to edit your php code, where you generate hmtl for images to the code below:

    $slide_images[$filename] = '<a class="fancybox" data-fancybox-group="slide-N">';
    $slide_images[$filename] .= "<img src='{$filename}' alt='{$filename}' />";
    $slide_images[$filename] .= '</a>';
    

    So you'll get exact markup, needed for fancybox, but you have to set fancybox-data-group attribute to be equal for all images on one slide (replace "slide-N" to your actual "slide-1" etc), when fancybox will show thumbs for images on your current slide. Here is jsfiddle example what you'll get after it.

    0 讨论(0)
提交回复
热议问题