Flex Slider - How to add same controls for two sliders

后端 未结 5 1834
无人共我
无人共我 2020-12-09 13:19

I am using Flex slider for one project. I need to control two sliders on one page with same controls.

One part is main slider that will show images, and the second o

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-09 13:57

    You could accomplish what you're trying to do by ditching the controlsContainer setting and creating your own navigation that you then link to both sliders. Here's an idea of how (please note it's untested)

    Your markup would look something like this. Note the rel attribute on the links - we'll use them below. Also note that the values start from 0 - this matches the values for the slides (e.g. the first slide is 0, the second is 1 etc).

    slide link 1
    slide link 2
    slide link 3
    slide link 3
    
    
    • Text 1

    • Text 2

    • Text 3

    • Text 4

    Then you set up the call to flexslider

    
    

    Basically both sliders are controlled by the same set of navigation links. Think this should get you moving in the right direction but shout if you need anything explained.

提交回复
热议问题