Skip to content

Commit

Permalink
Adds default setting and logic to allow a single slide to display in …
Browse files Browse the repository at this point in the history
…a slideshow.
  • Loading branch information
mattyza committed Jul 2, 2013
1 parent 87ea64e commit 7d5de65
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jquery.flexslider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) {
Expand Down

0 comments on commit 7d5de65

Please sign in to comment.