Skip to content

Commit 4378cb9

Browse files
committed
Add option to adapt height based on currently visible slides (fix)
1 parent 7273a1b commit 4378cb9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

jquery.carousel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@
999999
_updateHeight: function() {
10001000
var minIndex = this.props.currentDomIndex,
10011001
maxIndex = minIndex + this.props.visible,
1002-
filterSelector = (minIndex > 0) ? ':gt(' + (minIndex-1) + '):lt(' + (maxIndex) + ')' : ':lt(' + (maxIndex) + ')',
1002+
filterSelector = (minIndex > 0) ? ':gt(' + (minIndex - 1) + '):lt(' + this.props.visible + ')' : ':lt(' + (maxIndex) + ')',
10031003
height = this._getHighestSlide(filterSelector);
10041004

10051005
this.$dom.frame.animate({

0 commit comments

Comments
 (0)