<section class="slideshow" id="slideshow">
<div id="slides">
<div class="slides-container">
<div class="slide">
<img src="img/people.jpeg" alt="Cinelli">
</div>
<div class="slide">
<img src="img/surly.jpeg" width="1024" height="682" alt="Surly">
</div>
<div class="slide">
<img src="img/cinelli-front.jpeg" width="1024" height="683" alt="Cinelli">
</div>
<div class="slide">
<img src="img/affinity.jpeg" width="1024" height="685" alt="Affinity">
</div>
</div>
<nav class="slides-navigation">
<a href="#" class="next"></a>
<a href="#" class="prev"></a>
</nav>
</div>
</section>
I made a slider that works fine, but needs some time to load. I work with a platform that hides every element until you check a checkbox to show it. It shows the slide container, but doesn't show the content cause it has not loaded yet before hiding.
Is there a way to wait until the slider is loaded before hiding it?
if ($('#slideshow_checkbox').prop('checked')) {
$('#slideshow').show();
} else {
$('#slideshow').hide();
}