fix error

This commit is contained in:
邱博亞 2022-09-24 13:22:58 +08:00
parent afd3b97587
commit 38cc9fbc8b
1 changed files with 8 additions and 2 deletions

View File

@ -40,12 +40,15 @@ window.GalleryTheater = function() {
button_play_string = '<button id ="theaterPlayButton" class="theaterButton">▶ </button>', button_play_string = '<button id ="theaterPlayButton" class="theaterButton">▶ </button>',
button_stop_string = '<button id ="theaterStopButton" class="theaterButton">|| </button>', button_stop_string = '<button id ="theaterStopButton" class="theaterButton">|| </button>',
playtimeoutID; playtimeoutID;
var initialize = function() { var set_margin = function () {
if ($('#orbit-bar').height()>0){ //for show page if ($('#orbit-bar').height()>0){ //for show page
$('#gallery-theater-stage>.gallery').css('margin-top','2.4em') $('#gallery-theater-stage>.gallery').css('margin-top','2.4em')
}else{ }else{
$('#gallery-theater-stage>.gallery').css('margin-top','') $('#gallery-theater-stage>.gallery').css('margin-top','')
} }
}
var initialize = function() {
set_margin();
stage = $("#gallery-theater-stage"); stage = $("#gallery-theater-stage");
closeBtn = stage.find(".gallery-close"); closeBtn = stage.find(".gallery-close");
switchBtn = stage.find(".gallery-theme-switch"); switchBtn = stage.find(".gallery-theme-switch");
@ -559,7 +562,10 @@ window.GalleryTheater = function() {
$(document).ready(function() { $(document).ready(function() {
initialize(); initialize();
}) });
$(window).load(function() {
set_margin();
});
} }
// gallery-image gal-prev gal-inactive // gallery-image gal-prev gal-inactive