arekstasiewicz
arekstasiewicz

Reputation: 383

bx-slider adaptive height / wrong height

I'm using BxSlider v4.1 and I've notice that using 'adaptiveHeight' option calculates wrong slide height. The reason of that is image loaded in the background, while navigating between slides.

Is there a way to force recalculation of slide height?

My first solution is to set min-height in css, but that's not working properly.

Upvotes: 3

Views: 4156

Answers (1)

Andrew Saturn
Andrew Saturn

Reputation: 101

try moving the bxSlider initialization into $(window).load instead of $(document).ready.

Moving it to $(window).load waits for all images to completely load before initializing bxSlider, which will allow it to properly calculate the heights.

Upvotes: 5

Related Questions