From 29c6ed6e9ba41c7fe743fc24928cc56b83090060 Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 10 Jul 2017 09:51:15 +0200 Subject: [PATCH] hide slide arrows when there are no more slides in that direction --- www/slide/slide.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/www/slide/slide.js b/www/slide/slide.js index 87d9405a2..c7df80d77 100644 --- a/www/slide/slide.js +++ b/www/slide/slide.js @@ -69,6 +69,12 @@ define([ $content.find('.slide-container').first().css('margin-left', -(i*100)+'%'); updateFontSize(); change(Slide.lastIndex, Slide.index); + $modal.find('#button_left > span').css({ + opacity: Slide.index === 0? 0: 1 + }); + $modal.find('#button_right > span').css({ + opacity: Slide.index === (getNumberOfSlides() -1)? 0: 1 + }); }; var draw = Slide.draw = function (i) { if (typeof(Slide.content) !== 'string') { return; }