fkjj.net
ǰλãҳ >> jquEry sCrolltop ΪʲôûЧ >>

jquEry sCrolltop ΪʲôûЧ

취 ԪΪɼ״̬el.style.display='block'Ϳԭel.scrollTopԻjQueryscrollTopˡ

$(".dh4").click(function(){ $('body,html').animate({scrollTop:670},500); return false; }) ʱ붥670pxλãһǸdiv붥ֱ

ֻquirkģʽ£ body.scrollTopDZжֵ֧ Ҳ ҲûбҪȥǣ ֻҪסһ if(window.pageYOffset){//һȥ˴󲿷֣ ֻIE678 }else if(document.documentElement.scrollTop ){//IE678 ķquirkģʽ }...

scrollTopjqueryеúõʱҪjqueryڿ⣻Ȼ÷ $(document).ready(function(){ $(".btn1").click(function(){ $("div").scrollTop(100); }); $(".btn2").click(function(){ alert($("div").scrollTop()+" px"...

$(".dh4").click(function(){ $('body,html').animate({scrollTop:670},500); return false; }) ʱ붥670pxλãһǸdiv붥ֱ

ɡ ҪbodyĹ¼ $(function(){ var min_height = 100; $(window).scroll(function() { //ȡڵĹĴֱλ var s = $(window).scrollTop(); //ڵĹĴֱλôҳС߶ʱ...

ޱĵ $(document).ready(function(){ for(var i=1;i

ʱ setInterval(funtion(){ var oDiv.style.top=oDiv.offsetTop+20;//Ϲ ı },30)

ڵڶҳҪжϹ ˼ÿιɺҪסscrollTop ȻźжϹ û취Ϲ....

var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;

վҳ | վͼ
All rights reserved Powered by www.fkjj.net
copyright ©right 2010-2021
磬ַϵͷzhit325@qq.com