How to hide images until AFTER jquery flexslider finishes loading

后端 未结 6 1278
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-06 00:05

I tried to integrate wootheme\'s Flexslider on my site and it looks/works great except for when it is loading.

When you refresh the page with the slider, before flexslid

6条回答
  •  渐次进展
    2021-02-06 00:58

    You need to deal with the callback functions for the plugin you are using hide all the images from CSS by using a class let's say flexImages

    $(document).ready(function() {
    
      $('.flexslider').flexslider({
        animation: "slide",
        animationLoop: false,
        itemWidth: 210,
        itemMargin: 5,
        minItems: 2,
        maxItems: 4, 
        start: function(){
             $('.flexImages').show(); 
        },
      });
    });
    

提交回复
热议问题