JQuery
共 2 篇文章
返回顶部效果(转)
$(function(){ $(window).scroll(function () { if ($(this).scrollTop() > 500) { $('#toTop').fadeIn(); } else { $('#toTop').fadeOut(); } }); $("#toTop").click(function(){ $("html,body").animate({scrollTop:0},"slow"); return false; }); }); 转自 http://aijuans.iteye.com/blog/1884591
2013-06-09 01:47 · JQuery · HTML · jQuery