Skip to content

Commit

Permalink
Show dots only when needed
Browse files Browse the repository at this point in the history
Issue kenwheeler#3009: Show dots only when needed
  • Loading branch information
cbieser authored Aug 28, 2017
1 parent 8ccd846 commit 5a3c6fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions slick/slick.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@
var _ = this,
i, dot;

if (_.options.dots === true) {
if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {

_.$slider.addClass('slick-dotted');

Expand Down Expand Up @@ -1386,7 +1386,7 @@

var _ = this;

if (_.options.dots === true) {
if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
$('li', _.$dots).on('click.slick', {
message: 'index'
}, _.changeSlide);
Expand All @@ -1396,7 +1396,7 @@
}
}

if ( _.options.dots === true && _.options.pauseOnDotsHover === true ) {
if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.slideCount > _.options.slidesToShow) {

$('li', _.$dots)
.on('mouseenter.slick', $.proxy(_.interrupt, _, true))
Expand Down

0 comments on commit 5a3c6fb

Please sign in to comment.