Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions dist/js/lightslider.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! lightslider - v1.1.6 - 2016-10-25
/*! lightslider - v1.1.6 - 2016-12-23
* https://github.com/sachinchoolur/lightslider
* Copyright (c) 2016 Sachin N; Licensed MIT */
(function ($, undefined) {
Expand Down Expand Up @@ -581,6 +581,21 @@
$this.resetSlide($slide.find('.lslide').length);
}
}
// disabled arrow control
if (settings.loop === false) {
if ($el.getCurrentSlideCount() === 1) {
$slide.parent().find(".lSAction a.lSPrev").addClass("disabled");
} else {
$slide.parent().find(".lSAction a.lSPrev").removeClass("disabled");
}

if (slideValue === (w - elSize - settings.slideMargin)) {
$slide.parent().find(".lSAction a.lSNext").addClass("disabled");
} else {
$slide.parent().find(".lSAction a.lSNext").removeClass("disabled");
}
}
// disabled arrow control
}
};
refresh.calSlide();
Expand Down Expand Up @@ -851,7 +866,7 @@
$slide.on('touchend', function () {
if (w < elSize) {
if (w !== 0) {
return false;
return true;
}
}
var distance;
Expand Down
Loading