简体   繁体   中英

Flexslider only Horizontal Slide not work

I ask already for the problem but i could now find exactly the error.. the ERROR appears only with :

<script type="text/javascript">
(function($){
 $(document).ready(function(){
   $('#banner-slider-text').flexslider({
    animation: "slide",
    direction: 'horizontal',
  });
 });
})(jQuery);

Exactly only on "slide" with "horizontal" appears the problem that it dont slide ... when i look in the code view from chrome or firebug i see that the "activ" slide changed but not the visual. it dont slide anyways. SLide + Vertical work, Fade + Vertical work, Fade + Horizontal work, Slide + Horizontal NOT WORK.

Flexslider vers 2.*
JQuery ver 1.9 - 2.* testet 
Shopware vers 4.3.6

Slider is coded in smarty tpl with the Slider Options and loaded in the Home index tpl from the mainpage.

After alot of Debugging i found out that at code line 928 the style are set and here is the width with the slider.computedW variable is NaN ... thats the reason why with is dont Set ... and at code line 874 is the target for the transform translate3D NaN to ... i get no transform element for the animation

928
setTimeout(function(){
        slider.doMath();
        slider.newSlides.css({"width": slider.computedW, "float": "left", "display": "block"});
        // SMOOTH HEIGHT:
        if (slider.vars.smoothHeight) { methods.smoothHeight(); }
      }, (type === "init") ? 100 : 0);

874
if (slider.transitions) {
    target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + target + ",0,0)";
    dur = (dur !== undefined) ? (dur/1000) + "s" : "0s";
    slider.container.css("-" + slider.pfx + "-transition-duration", dur);
     slider.container.css("transition-duration", dur);
  }

maybe thats the reason why my slide Horizontal dont work .... but i am not sure

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM