This commit is contained in:
@@ -317,15 +317,15 @@ $(function () {
|
||||
|
||||
// 回到顶部功能
|
||||
$("#backTop").click(function () {
|
||||
$("html, body").animate({ scrollTop: 0 }, 600);
|
||||
$("html, body").animate({ scrollTop: 0 }, 300);
|
||||
});
|
||||
|
||||
// 根据滚动位置显示/隐藏回到顶部按钮
|
||||
$(window).scroll(function () {
|
||||
if ($(this).scrollTop() > 300) {
|
||||
$("#backTop").fadeIn();
|
||||
$("#backTop").fadeIn(300);
|
||||
} else {
|
||||
$("#backTop").fadeOut();
|
||||
$("#backTop").fadeOut(300);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user