Flexslider manualControls not working

Paul Elliot picture Paul Elliot · Mar 6, 2013 · Viewed 10k times · Source

I have created a slider with Flexslider and I am trying to use manualControls: to create a navigation menu but the links wont work. Here is code for flexslider and the slider/navigation itself:

Flexslider:

 <script type="text/javascript" charset="utf-8">
  $(window).load(function() {
    $('.flexslider').flexslider({
      controlsContainer: ".slidercontainer",
      controlNav: true,
      manualControls: ".flex-control-nav li",
      }); 
 });
 </script>  

Slider and nav:

    <div class="slidercontainer">
        <div class="flexslider">
            <ul class="slides">
              <li>slide1</li>
              <li>slide2</li>
            </ul>
            <ul class="flex-control-nav">
              <li>1</li>
              <li>2</li>
            </ul>
    </div>          
    </div>

Answer

Andrew White picture Andrew White · Mar 26, 2013

have you fixed this yet? If not, the answer is because FlexSlider still has a live event in the plugin - but jQuery has deprecated this.

To fix it; open up jQuery.flexslider.js and do a find/replace for "live", replacing it with "on". I actually searched ".live(" and replaced with ".on(" just to make sure I only got the event listener. There are 2 occurrences.

That's it. Works perfectly!