JQ实现小火箭效果
2024-09-03 18:54:16
点击返回顶部以动画方式返回
$(function(){
$(window).scroll(function(){
//当滚动距离超过50后,显示按钮;
if($(window).scrollTop()>50){
$("#top").fadeIn();
}else{
$("#top").fadeOut();
}
});
$("#top").click(function(){
$('html,body').animate({scrollTop:0},500);
});
});
最新文章
- redis数据结构存储Dict设计细节(redis的设计与实现笔记)
- MongoDB的安装与设置MongoDB服务
- 如果调用ASP.NET Web API不能发送PUT/DELETE请求怎么办?
- 数据库中Schema和Database有什么区别
- Java Web 工作技巧总结 16.10
- Android中多个调用Activity的问题
- list如何remove 特别容易出错
- 使用.net(C#)发送邮件学习手册(带成功案例)
- 130. Surrounded Regions
- Codeforces Round #226 (Div. 2)B. Bear and Strings
- Sdut 2409 The Best Seat in ACM Contest(山东省第三届ACM省赛 H 题)(模拟)
- C/C++中的const int*和int * const
- NOPI 导出excel 通用方法
- POJ2299 Ultra-QuickSort 【树阵】+【hash】
- Executor框架学习笔记
- mysql启动时报错:Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid) 的解决方法
- 为什么说要搞定微服务架构,先搞定RPC框架?
- java.sql.SQLException: Access denied for user 'sa'@'localhost' (using password: NO)
- js switch 用法
- maven多模块项目构建