fix: 修复浮动按钮容器不显示的问题
- 为 fabtns-unloaded 添加过渡动画 - 添加 jQuery 和 DOM 加载检查,确保元素存在后再初始化 - 添加重试机制,防止初始化失败
This commit is contained in:
@@ -683,7 +683,20 @@ if (argonConfig.waterflow_columns != "1") {
|
||||
|
||||
/*浮动按钮栏相关 (回顶等)*/
|
||||
!function(){
|
||||
// 确保 DOM 和 jQuery 已加载
|
||||
if (typeof jQuery === 'undefined') {
|
||||
console.warn('jQuery not loaded, retrying...');
|
||||
setTimeout(arguments.callee, 50);
|
||||
return;
|
||||
}
|
||||
|
||||
let $fabtns = $('#float_action_buttons');
|
||||
if ($fabtns.length === 0) {
|
||||
console.warn('Float action buttons not found, retrying...');
|
||||
setTimeout(arguments.callee, 50);
|
||||
return;
|
||||
}
|
||||
|
||||
let $backToTopBtn = $('#fabtn_back_to_top');
|
||||
let $toggleSidesBtn = $('#fabtn_toggle_sides');
|
||||
let $toggleDarkmode = $('#fabtn_toggle_darkmode');
|
||||
|
||||
Reference in New Issue
Block a user