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붥ֱ

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 scroll¼ʵּعҳʾ,ʹajax,ͬʱ(document).height()$(window).height(),ҪѿԲο scroll¼window󣬵ҲɹiframeCSS overflowΪscr...

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

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

Ҫ׼IJϷֱУԡhtml༭ 1ȣhtml༭½htmlļ磺index.htmljquery 2index.htmlеıǩjquery룺 var container = $('body');var scrollTo = $('#scroll');container....

1jqueryȡ߶ʹ.scrollTop() 2½һƪHTMLĵ 3ȻDZ༭JSűʹ.scroll()ҳ 4Ȼʹ.scrollTop()ȡֱ롣 5Ȼ󱣴ļ鿴ȡĴֱ뼴...

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