This commit is contained in:
2025-04-30 14:07:03 +08:00
parent 3bc46efde8
commit 1be6e649e1
3 changed files with 262 additions and 19 deletions

View File

@@ -52,13 +52,31 @@ var Jour_num = localStorage.Journals_num;
$(document).ready(function () {
$("#tablist li").each(function (index) {
$(this).click(function () {
console.log('this at line 54:', this);
// 移除所有的 contentin 和 tabin 类
$(".contentin").removeClass("contentin");
$(".tabin").removeClass("tabin");
// 添加 contentin 和 tabin 类
$(".content-box>div").eq(index).addClass("contentin");
$(this).addClass("tabin")
$(this).addClass("tabin");
// 判断当前点击的 <li> 是否具有 'tarhtmn' 类名
if ($(this).hasClass('tarhtmn')) {
// 设置当前点击的 <li> 宽度为 100%
$(".left").css("width", "100%");
$(".right").hide(); // 隐藏 .right 标签
} else {
// 移除当前点击的 <li> 宽度样式
$(".left").css("width", "");
$(".right").show(); // 恢复显示 .right 标签
}
});
})
})
});
});
//返回顶部
@@ -203,7 +221,7 @@ function imgbig1(which) {
imgsrc = imgsrc.replace(/^url\(["']?/, '').replace(/["']?\)$/, ''); // 处理 URL 去掉多余字符
$("#bigimg").css("display", "block");
$("#bigimg").html("<img src=" + imgsrc + " onmousewheel='return rollImg(this)'/>");
$('#bigimg>img').css('margin-top', -$('#bigimg>img').height() / 2);