From d1ce9f3f3eaff0bcbea048524373fe86a6c1f572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Sta=CC=88blein?= Date: Thu, 6 Aug 2015 16:38:11 +0200 Subject: [PATCH] Fix incorrect detection of last slide on viewport resize --- dist/jquery.bxslider.js | 2 +- src/js/jquery.bxslider.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/jquery.bxslider.js b/dist/jquery.bxslider.js index 62b400f5..6c088006 100644 --- a/dist/jquery.bxslider.js +++ b/dist/jquery.bxslider.js @@ -508,7 +508,7 @@ var setSlidePosition = function() { var position, lastChild, lastShowingIndex; // if last slide, not infinite loop, and number of children is larger than specified maxSlides - if (slider.children.length > slider.settings.maxSlides && slider.active.last && !slider.settings.infiniteLoop) { + if (slider.children.length >= slider.settings.maxSlides && slider.active.last && !slider.settings.infiniteLoop) { if (slider.settings.mode === 'horizontal') { // get the last child's position lastChild = slider.children.last(); diff --git a/src/js/jquery.bxslider.js b/src/js/jquery.bxslider.js index a0a834b6..d0cca059 100644 --- a/src/js/jquery.bxslider.js +++ b/src/js/jquery.bxslider.js @@ -500,7 +500,7 @@ var setSlidePosition = function() { var position, lastChild, lastShowingIndex; // if last slide, not infinite loop, and number of children is larger than specified maxSlides - if (slider.children.length > slider.settings.maxSlides && slider.active.last && !slider.settings.infiniteLoop) { + if (slider.children.length >= slider.settings.maxSlides && slider.active.last && !slider.settings.infiniteLoop) { if (slider.settings.mode === 'horizontal') { // get the last child's position lastChild = slider.children.last();