diff --git a/app/assets/javascripts/theater.js b/app/assets/javascripts/theater.js index 51ab98f..6a411c7 100644 --- a/app/assets/javascripts/theater.js +++ b/app/assets/javascripts/theater.js @@ -445,7 +445,9 @@ window.GalleryTheater = function() { } else { img = imageContainer.find(".gal-active"); if (selectedFromStrip) { - imageContainer.find(".gal-" + direction).attr("src", currentPic.image.file.theater.url); + img = imageContainer.find(".gal-" + direction); + img.attr("src", currentPic.image.file.theater.url); + img.attr("alt", currentPic.image.alt_title); } if (direction == "next") { imageContainer.find(".gal-prev").remove(); @@ -527,6 +529,7 @@ window.GalleryTheater = function() { var obj = albumData.images[currentPic.index + 1], nextImg = $(""); nextImg.attr("src", obj.file.theater.url); + nextImg.attr("alt", obj.alt_title); nextImg.hide(); imageContainer.append(nextImg); nextImg.on("load", function() { @@ -545,6 +548,7 @@ window.GalleryTheater = function() { var obj = albumData.images[currentPic.index - 1], prevImg = $(""); prevImg.attr("src", obj.file.theater.url); + prevImg.attr("alt", obj.alt_title); prevImg.hide(); imageContainer.prepend(prevImg); prevImg.on("load", function() {