Pippy Longstocking
Pippy Longstocking

Reputation: 303

Glide.js not rendering fully when parent container is display: none/visibility: hidden

I am using https://glidejs.com/ - in a normal pag view the glide slider is rendered correctly. However i have a use case were I have a display: none; + visibility: hidden; for the main div parent container on page load.

After a few seconds, with javascript, the display: none; is removed and visibility is set to visible. At this point the Glide.js slider shows but it's not rendered properly (maybe because it does not know what dimensions to use since the parent divs are hidden/not displayed. When i do a simple manual resize of the browser window with the mouse, the Glide.js is "re-rendered" automatically and it works perfectly, as if it was never broken.

Is there a way to force a redraw or redo of the Glide.js code so that the JS is correctly applied AFTER the page is fully displayed via the JS after the predetermined time to show the full content?

Upvotes: 2

Views: 399

Answers (0)

Related Questions