This commit is contained in:
BoHung Chiu 2023-01-03 23:51:53 +08:00
parent 8e38343f22
commit 2fa82ac0f2
1 changed files with 3 additions and 2 deletions

View File

@ -6,12 +6,13 @@
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
if($("#page_layout").val() == "archive_index12"){ var has_expanded_layouts = ['archive_index2', 'archive_index4', 'archive_index12', 'archive_index14'];
if($.inArray($("#page_layout").val(), has_expanded_layouts) != -1){
$(".archive_expanded").addClass("show").removeClass("hide"); $(".archive_expanded").addClass("show").removeClass("hide");
} }
$("#page_layout").change(function(){ $("#page_layout").change(function(){
var value = $(this).val(); var value = $(this).val();
if(value == "archive_index12"){ if($.inArray(value, has_expanded_layouts) != -1){
$(".archive_expanded").addClass("show").removeClass("hide"); $(".archive_expanded").addClass("show").removeClass("hide");
}else{ }else{
$(".archive_expanded").removeClass("show").addClass("hide"); $(".archive_expanded").removeClass("show").addClass("hide");