Inspired bu the Flexslider issue https://drupal.org/node/1580902, we need a fix in this module also.

For example after implementing callbacks feature one could fix tabindex order (don't allow to focus hidden slides):

jQuery('.flexslider').bind('start', function(e, slider) {
  slider.slides.eq(slider.currentSlide).siblings().find('a').attr('tabindex', '-1');
});

jQuery('.flexslider').bind('after', function(e, slider) {
  slider.slides.find('a').attr('z-index', '');
  slider.slides.eq(slider.currentSlide).siblings().find('a').attr('tabindex', '-1');
});

... just to give you an idea how to use the callbacks and slider object.

Also I see there's a comment in the code: // @todo register other callbacks

Comments

hkirsman’s picture

Issue summary: View changes
hkirsman’s picture

hkirsman’s picture

Issue summary: View changes
hkirsman’s picture

Issue summary: View changes
zerobyte’s picture

I've used the patch from #2 but how do we make use of the callback functions, if you let's say, want the slideshow to end by going to the first slide after reaching the last slide?

I've tried:

end: function(slider) {
            slider.flexAnimate( 0 );
          }

and

after: function(slider) {
    if (slider.currentSlide == 0) { // is last slide
          n--;
          if(n==0) {
            slider.pause();
          }
       }


    }

but nothing seems to work.

coloradocolin’s picture

This worked for me. @zerobyte just add your code in like this:

$('.flexslider').bind('end', function(e, slider) {
  // Your code here
});
drupalbabaji’s picture

#2 patch and #6 code worked for me

nikunjkotecha’s picture

Priority: Normal » Major
Status: Active » Reviewed & tested by the community

Works perfectly fine, thanks for the patch.