fix error

This commit is contained in:
邱博亞 2023-03-11 11:51:41 +08:00
parent 89c67b223b
commit 08ad4f3790
1 changed files with 4 additions and 1 deletions

View File

@ -437,10 +437,13 @@ window.GalleryTheater = function() {
$('div.gallery-show-original a').eq(0).attr('href', currentPic.image.url)
img = imageContainer.find(".gal-active");
if (direction == null) {
if (img.length==0){
img = $("<img class='gallery-image gal-active'>");
imageContainer.append(img);
}
img.hide();
img.attr("src", currentPic.image.file.theater.url);
img.attr("alt", currentPic.image.alt_title);
imageContainer.append(img);
img.one("load", function() {
one_load(img)
})