Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic adding slides "blinks" #1408

Open
XMMM1 opened this issue Aug 15, 2015 · 1 comment
Open

Dynamic adding slides "blinks" #1408

XMMM1 opened this issue Aug 15, 2015 · 1 comment
Assignees
Projects
Milestone

Comments

@XMMM1
Copy link

XMMM1 commented Aug 15, 2015

Hello all.

Currently i am testing flexslider for dynamic slides addition. I have implement it successfully but there is a thing that bothers me.

So this is my code for first empty the slider

var slider = $('.flexslider').data('flexslider');
while (slider.data('flexslider').count > 0) {
slider.data('flexslider').removeSlide(0);
}

and then fill it again
for (var i = 0; i < showSlides.length; i++) {
$('.flexslider').data('flexslider').addSlide(

  • );
    }

    The code is called in
    $('.db1').change(function (e) { place where my code is called });

    My question is:
    Why does addSlide add slides one on top of another and after change() completes flexslider "reinit" itself for showing navigation or not and so on.. Effect that happens is ugly blink where slides are added like
    slide 1
    slide 2
    slide 3
    example of my current behaviour: http://postimg.org/image/ctqggb40r/
    and after reinit everything ok: http://postimg.org/image/aksh03prl/

    on my page, and as i said after change function is complete flexslider reinit itself.

    Do anyone have some advice how to add slided directly to slider without "this strange vertical positioning and blinks before reinit"?

    If needed i will provide more code and more info.

    Thanks in advance for helping me.

    @XMMM1 XMMM1 changed the title Dynamic adding slides Dynamic adding slides "blinks" Aug 15, 2015
    @scattond
    Copy link

    Hi, you asked for help in an issue that I started. Your problem is not really similar to what was happening to me, but I have a suggestion that you can try. Try giving your slideshow (or the container that your slideshow is inside) a set height, and then make the overflow hidden. That should hide anything that temporarily appears below the slideshow while it loads.

    @jeffikus jeffikus self-assigned this Aug 19, 2015
    @jeffikus jeffikus added this to the 2.6.5 milestone Sep 15, 2017
    @jeffikus jeffikus added this to Assess in 2.6.5 Sep 15, 2017
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    2.6.5
    Assess
    Development

    No branches or pull requests

    3 participants