打开主菜单
首页
随机
最近更改
特殊页面
设置
关于珠海交通维基
免责声明
珠海交通维基
搜索
更改
←上一编辑
下一编辑→
MediaWiki:Common.js
(查看源代码)
2021年1月25日 (一) 13:49的版本
添加766字节
、
2021年1月25日 (一) 13:49
无编辑摘要
第7行:
第7行:
s.parentNode.insertBefore(hm, s);
s.parentNode.insertBefore(hm, s);
})();
})();
+
+
/* 回到顶部 */
+
$(function() {
+
var txt = " ",
+
btn = $('<div/>', {
+
"text": "返回顶部",
+
"attr": {
+
"title": "返回顶部",
+
"class": "backToTop"
+
},
+
'css': {
+
'user-select': 'none'
+
},
+
'on': {
+
'click': function() {
+
$("html, body").animate({
+
scrollTop: 0
+
}, 120);
+
}
+
}
+
}).appendTo(document.body);
+
$(window).on('scroll', function() {
+
$(document).scrollTop() > 0 ? btn.fadeIn() : btn.fadeOut();
+
}).scroll();
+
});
+
+
$('.heimu a').on("click", function() {
+
if (!$(this).closest('.heimu').is(':active, :focus')) return false;
+
});
Zhbus
行政员
、
界面管理员
、
监督员
、
管理员
15,684
个编辑