[bxSlider] Sample of the "adaptiveHeight" option to make the slider height variable for each slide
![[bxSlider] Sample of the 'adaptiveHeight' option to make the slider height variable for each slide](img/ogp.png)
Here's a sample of the 'adaptiveHeight' option for the jQuery slider plugin "bxSlider", which adjusts the slider's height to the current slide when image sizes (heights) are inconsistent.
We introduce how to equalize inconsistent slide heights here.
Sample
We have prepared images with varying heights.
You will notice that the slider's height changes to match the height of the current slide.
HTML
We will create a very standard bxSlider.
<div class="bxslider">
<div class="slide"><img src="img/img01.jpg"></div>
<div class="slide"><img src="img/img02.jpg"></div>
<div class="slide"><img src="img/img03.jpg"></div>
<div class="slide"><img src="img/img04.jpg"></div>
</div>
JS
The JS looks like this.
$('.bxslider').bxSlider({
auto: true, /* optional */
adaptiveHeight: true
});
You can set this by adding "adaptiveHeight: true" on the 3rd line.
Comments
We also welcome reports such as "It worked!"








If this was helpful, we appreciate your support!
All support received will go toward my child’s upbringing.
Author's My Baby List (Amazon)
Send support via OFUSE
Or support me by buying something from the buttons below
(You don't have to buy the specific item on the linked page.)
Support me via Amazon
Support me via Rakuten
Support me via Yahoo!Shopping
PR