Open GuilleMos opened 6 years ago
Best solution I could find until now:
Add a script to show the container after the website is load and make sure the container has "display: none;" in the stylesheet.
$(window).load(function(){
$('#back2').show();
$('#back3').show();
$('.featured-link-text-overlay').show();
});
The script will show the container after everything is load.
It maybe is not the best way but it works.
If someone knows a better way please share it!
It worked for me with a little bit of jQuery and CSS.
jQuery:
$("body").bind("DOMNodeInserted", function() {
var $this = $(this).find('.slick-initialized');
window.setTimeout(function(){
$this.addClass('finally-loaded');
}, 2000);
});
CSS:
.slick-slider {
opacity: 0;
visibility: hidden;
transition: opacity 1s ease;
-webkit-transition: opacity 1s ease;
}
.slick-slider.finally-loaded {
visibility: visible;
opacity: 1;
transition: opacity 1s ease;
-webkit-transition: opacity 1s ease;
}
This css works for me.
.my-slider-container {
opacity: 0;
visibility: hidden;
transition: opacity 1s ease;
-webkit-transition: opacity 1s ease;
}
.my-slider-container.slick-initialized {
visibility: visible;
opacity: 1;
}
Hi there,
I implemented slick slider on a Shopify website and everything works very well but the only issue is that the images stack at bottom of each other while the page is loading.
Once it is completely load the images jump back to where they should.
I tried to solve this issue in many different ways and the best way looks to be via CSS using "visibility: hidden;" however I can not find the way to make this work.
Is there a way to fix this problem while it is loading?
This is the Shopify code I am using right now:
Many thanks in advance for your help guys!