The title says it all.
I am currently working on a website using a single HTML file, where different pages are represented by div
elements that toggle between display:none
and display:block
based on an onclick
function. On one of these pages, I want to incorporate a Slick Slider. However, I am encountering an issue where the Slider fails to load properly the first time the div is displayed. It only functions correctly after clicking the next/previous buttons or resizing the browser window. Is there a solution to this problem?
You can view the Fiddle (apologies for the excess code) which includes the relevant CSS at the end and clearly identified javascript.
https://jsfiddle.net/Santos1600/9xv67aL8/
To access the slider, follow these steps: Click on the image below "Sonhar", Open the hamburger Menu, Click on "Episódios", use the previous or next button to see the intended loading behavior. Please note that this is still a work in progress...just random div
s with gray background.