Question

I know it has options to have horizontal or vertical scrolling, reverse directions, do a slide or fade. Is it possible to change these options on the fly resulting in a variety of animations within the same slider?

Was it helpful?

Solution

you could try something like this

  $(window).load(function() {

  // store the slider in a local variable
  var flexslider;

  /** 
   *  Animation with Fade for
   *  default
  **/
  $('.flexslider').flexslider({
      animation: "fade"
  });

  /**
   *  On click, directly change
   *  the public .vars within flexslider.
  **/
  $(document).on('click', function(){
      flexslider.vars.animation = "slide";
  });

}); 

REF:

Reinitialise existing jQuery flexslider with new options

FLEX SLIDER DOCS: https://github.com/woothemes/FlexSlider

Happy Coding :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top