Flexslider not initialize properly

Flexslider not initialize properly. Slider gallery not loading on page load. Flexslider working proper in some cases and fail and not display random page load.

Recently facing issue with Flexslider, issue is, gallery not display fully with jQuery page load event.

After some R&D found working solution. Solution is simple and works in every page refresh.

Solution code for Flexslider not initialize


(function($) {
    $(window).load(function(){
        $('.flexslider').flexslider({
            animation: "slide"
        });
    });
})(jQuery);