Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I use Flexslider2 plugin and I need that clicking on a link, for example: http://www.example.com/#slide3 would start Flexslider at the slide number 3.
<div class="controls">
   <a href="http://www.example.com/#slide1"><img id="slide1" src="http://www.example.com/img1.jpg"/></a>
   <a href="http://www.example.com/#slide2"><img id="slide2" src="http://www.example.com/img2.jpg"/></a>
   <a href="http://www.example.com/#slide3"><img id="slide3" src="http://www.example.com/img3.jpg"/></a>
   <a href="http://www.example.com/#slide4"><img id="slide4" src="http://www.example.com/img4.jpg"/></a>
</div>

<div class="flexslider">
   <ul class="slides">
     <li><img id="slide1" src="http://www.example.com/img1.jpg"/></li>
     <li><img id="slide2" src="http://www.example.com/img2.jpg"/></li>
     <li><img id="slide3" src="http://www.example.com/img3.jpg"/></li>
     <li><img id="slide4" src="http://www.example.com/img4.jpg"/></li>
   </ul>
 </div>


JS:

JavaScript
$('.flexslider').flexslider({
        animation: "slide",
        animationLoop: false,
        itemWidth: 200,
        itemMargin: 0,
        minItems: 1,
        maxItems: 2,
        useCSS: false,
        move: 2,
        slideshow:false,
        controlNav:false,
        directionNav:true,
        touch:true
     })
Posted
Comments
So, what is the issue?
Member 10855611 31-May-14 1:16am    
The issue is that I need additional short code that could change flexslider's property "startAt: 0". For example, when link href="#slide3" is pressed, code should change flexslider's property to "startAt: 3". Could you help me with this?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900