Weird flickering background with multiple flex sliders on page
Asked Answered
D

2

5

I have a website that is 1-page and has multiple sections, each containing a content DIV and a flexslider. On larger screens, there seems to be a weird bug that's causing the backgrounds to flicker with the slide animation, in action here: http://yyy.comuf.com/PORT/

I think it's because there are multiple flexsliders on the page, but not sure of the best way to fix it.

JS

  $(window).load(function() {
$('#main-slider').flexslider({
  animation: 'slide',
  controlsContainer: '.flex-container'
});

$('#secondary-slider').flexslider();

});

HTML SLIDER-1

<div id="main-slider" class="flexslider">
  <ul class="slides">
    <li>
      <img src="img/FP1.png" />
    </li>
    <li>
      <img src="img/abcd.png" />
    </li>
    <li>
      <img src="img/i-eg.png" />
    </li>
  </ul>
</div>

HTML SLIDER-2

<div id="secondary-slider" class="flexslider">
  <ul class="slides">
    <li>
      <img src="img/OU.png" />
    </li>
    <li>
      <img src="img/OU1.png" />
    </li>
    <li>
      <img src="img/OU2.png" />
    </li>
  </ul>
</div>

Both sliders are currently the same except different images.

Main JS file is here: http://yyy.comuf.com/PORT/js/jquery.flexslider.js

Disturbing answered 13/7, 2012 at 13:0 Comment(1)
Could you please post some relevant code?Burkett
C
3

It's a problem due to many bug in css3 3d transformations, you can use the new parameter

useCSS:false

included in the new plugin version. This options forces new browsers (webkit one, that implements css transformations) to use jquery 4 animation. I solved this way. I face this problem only with Chrome, version 21, but not with Safari 6.

Cryptic answered 3/9, 2012 at 11:20 Comment(0)
A
4

Another option is to use

-webkit-transform: translateZ(0);

Apply it to the container element.

I found the answer here: https://mcmap.net/q/1857195/-flexslider-really-messing-up-my-webpage-in-chrome

And it worked perfectly for me. It also means you can use cssTransitions which from what I understand are less resource heavy on mobile devices.

Altheta answered 15/9, 2013 at 19:43 Comment(0)
C
3

It's a problem due to many bug in css3 3d transformations, you can use the new parameter

useCSS:false

included in the new plugin version. This options forces new browsers (webkit one, that implements css transformations) to use jquery 4 animation. I solved this way. I face this problem only with Chrome, version 21, but not with Safari 6.

Cryptic answered 3/9, 2012 at 11:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.