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

jquEry sCrolltop ΪʲôûЧ

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

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

ԭ html˸߶ʱȡ$(window).scrollTop(),$(document).scrollTop()ȡֵΪ0 취 ֵ $(document).ready(function() { $(window).scroll(function(e){ var juantop=$(document).scrollTop() alert(juantop)...

ֻ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"...

window.onbeforeunload= function () { return "رҳ"; //رҳʱĵ } window.onscroll= function () { alert("ҳ"); } window.onresize= function () { alert("ҳСı"); } window.onmousewheel= function () { aler...

scrollTop() ػƥԪصĹĴֱλá֮ǹҳ涥Ĵֱ൱yscrollLeft() ػƥԪصĹˮƽλá ˮƽλָǴλʱλ...

ãҪȷһҪjQueryscrollTopȡඥ˵ľ룬ҪʹscrollTopùඥ˵ľ룬˵Ҫ߼汸 1ǻȡԭjsʵֺף var div = document.getElementById('wgt-ask'), scrollTop ...

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

$('html,body').animate({ scrollTop: h}, 500);

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