wlbk.net
ǰλãҳ >> jquEry $(winDow).sCrollTop()Ϊʲôһֱ0 >>

jquEry $(winDow).sCrollTop()Ϊʲôһֱ0

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

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

$(".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(); //ڵĹĴֱλôҳС߶ʱ...

ƪҪjQuery scroll¼ʵּعҳʾ,ʹajax,ͬʱ(document).height()$(window).height(),ҪѿԲο scroll¼window󣬵ҲɹiframeCSS overflowΪscr...

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

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

jquery #Float {background-color: #000;height: 200px;width: 100px;position: absolute;top: 80px;right: 20px;} $(document).ready(function(){ $(window).scroll(function (){ // ø봰ڶʼձ80px var offsetTop ...

jQueryȡط jquery ȡ߶ ȡʾĸ߶ $(window).height(); ȡʾĿ $(window).width(); ȡҳĵ߶ $(document).height(); ȡҳĵ $(document).width(); ...

Ҫˣڵ㱾scrollTopԣҲǿֵָ

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