打开主菜单
首页
随机
最近更改
特殊页面
设置
关于珠海交通维基
免责声明
珠海交通维基
搜索
更改
←上一编辑
下一编辑→
MediaWiki:Mobile.js
(查看源代码)
2022年10月16日 (日) 01:37的版本
添加862字节
、
2022年10月16日 (日) 01:37
无编辑摘要
第41行:
第41行:
$( ".WidgetStyle" ).remove();
$( ".WidgetStyle" ).remove();
}
}
+
});
+
+
/* 回到顶部 */
+
$(function() {
+
var txt = '<i class="fa-angle-double-up fas"></i>',
+
btn = $('<div/>', {
+
'html': txt,
+
'attr': {
+
'title': '回到顶部',
+
'class': 'backToTop'
+
},
+
'css': {
+
'user-select': 'none'
+
},
+
'on': {
+
'click': function() {
+
$("html, body").animate({
+
scrollTop: 0
+
}, 120);
+
}
+
}
+
}).appendTo(document.body);
+
var fadeOutTimeout;
+
$(window).on('scroll', function() {
+
if ( $(document).scrollTop() == 0 ) {
+
btn.fadeOut();
+
} else {
+
clearTimeout(fadeOutTimeout);
+
btn.fadeIn();
+
fadeOutTimeout = setTimeout( function(){ btn.fadeOut(); }, 2333 );
+
}
+
}).scroll();
});
});
田所浩不二
机器人
、
界面管理员
、
管理员
3,662
个编辑