question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Slick Carousel doesn't render properly when a hidden div is made visible.

See original GitHub issue

Carousel doesn’t render properly in a hidden div.

====================================================================

[ http://jsfiddle.net/k75fyzy4/1/ ]

I’ve added a fiddle- but I don’t see this working properly in fiddle either. http://jsfiddle.net/k75fyzy4/1/

Here’s everything in a single page.

https://captainmccrank.github.io/

  1. Load the page above.
  2. click on the “Show Div” button
  3. Note that the carousel displays but without images.
  4. resize the browser window & note that the carousel images render.

====================================================================

Steps to reproduce the problem

  1. create a div with display set to none
  2. add button to reset display:block
  3. Observe that the images don’t render properly.
  4. Resize the window
  5. Observe the row properly rendering

====================================================================

What is the expected behaviour?

I’m hoping to see the carousel images rendered immediately when the div is made visible.

====================================================================

What is observed behaviour?

Carousel images aren’t visible until you resize the browser window.

====================================================================

More Details

  • Which browsers/versions does it happen on? Chrome56
  • Which jQuery/Slick version are you using? Jquery 2.2.0 Slick 1.6
  • Did this work before? never

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
paulinetheitgirlcommented, Mar 24, 2017

Hi @CaptainMcCrank , please try out the suggestions in https://github.com/kenwheeler/slick/issues/158

1reaction
nealokecommented, Apr 20, 2017

@paulinetheitgirl yes totally works 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Slick Slider not loading properly on a hidden div
The progress to get to the slider is: Click on the image below "Sonhar", Open the hamburger Menu, Click on "Episódios", use previous...
Read more >
Slick load in visually-hidden container has display issues
My main content is seperated in different sections, which are hidden after page load. In this sections are zero to unlimited slick slider....
Read more >
slick - the last carousel you'll ever need - Ken Wheeler
slick is a responsive carousel jQuery plugin that supports multiple breakpoints, CSS3 transitions, touch events/swiping & much more!
Read more >
slick-carousel not working with Partial View data - Microsoft Q&A
To directly update the html, you need to destroy the slick-carousel, update the html, and recreate the slick-carousel. This probably won't look ...
Read more >
Lazy Loading Images using Slick Slider - Solodev
In Part 4 of our Slick Slider Series, we will show you how to lazy load your slider images... ... Lazy loading your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found