fix error
This commit is contained in:
parent
89c67b223b
commit
08ad4f3790
|
@ -437,10 +437,13 @@ window.GalleryTheater = function() {
|
||||||
$('div.gallery-show-original a').eq(0).attr('href', currentPic.image.url)
|
$('div.gallery-show-original a').eq(0).attr('href', currentPic.image.url)
|
||||||
img = imageContainer.find(".gal-active");
|
img = imageContainer.find(".gal-active");
|
||||||
if (direction == null) {
|
if (direction == null) {
|
||||||
|
if (img.length==0){
|
||||||
|
img = $("<img class='gallery-image gal-active'>");
|
||||||
|
imageContainer.append(img);
|
||||||
|
}
|
||||||
img.hide();
|
img.hide();
|
||||||
img.attr("src", currentPic.image.file.theater.url);
|
img.attr("src", currentPic.image.file.theater.url);
|
||||||
img.attr("alt", currentPic.image.alt_title);
|
img.attr("alt", currentPic.image.alt_title);
|
||||||
imageContainer.append(img);
|
|
||||||
img.one("load", function() {
|
img.one("load", function() {
|
||||||
one_load(img)
|
one_load(img)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue