Permalink
Browse files

Adds default setting and logic to allow a single slide to display in …

…a slideshow.
  • Loading branch information...
1 parent 87ea64e commit 7d5de65a1d29c4b776cd3590c51a56159822b9ad @mattyza mattyza committed Jul 2, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 jquery.flexslider.js
View
3 jquery.flexslider.js
@@ -859,6 +859,7 @@
minItems: 0, //{NEW} Integer: Minimum number of carousel items that should be visible. Items will resize fluidly when below this.
maxItems: 0, //{NEW} Integer: Maxmimum number of carousel items that should be visible. Items will resize fluidly when above this limit.
move: 0, //{NEW} Integer: Number of carousel items that should move on animation. If 0, slider will move all visible items.
+ allowOneSlide: true, //{NEW} Boolean: Whether or not to allow a slider comprised of a single slide
// Callback API
start: function(){}, //Callback: function(slider) - Fires when the slider loads the first slide
@@ -880,7 +881,7 @@
selector = (options.selector) ? options.selector : ".slides > li",
$slides = $this.find(selector);
- if (($slides.length === 1 && options.allowOneSlide !== true) || $slides.length === 0) {
+ if ( ( $slides.length === 1 && options.allowOneSlide === true ) || $slides.length === 0 ) {
$slides.fadeIn(400);
if (options.start) options.start($this);
} else if ($this.data('flexslider') == undefined) {

0 comments on commit 7d5de65

Please sign in to comment.