We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
声明: 页面引用了jquery. 要获取滚动的距离 1: function qq(){console.log($(window).scrollTop())} $(window).scroll(qq()); 2: $(window).scroll(function (){console.log($(window).scrollTop())}; 1 里面获取的距离只显示一次 滚动完 刷新后才能更新, 2 里面的距离一直跟着滚动改变
why!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
The text was updated successfully, but these errors were encountered:
$(window).scroll(qq()); qq后面的(),让qq直接执行了; $(window).scroll(qq);这样能生效。
Sorry, something went wrong.
No branches or pull requests
声明: 页面引用了jquery. 要获取滚动的距离
1: function qq(){console.log($(window).scrollTop())}
$(window).scroll(qq());
2: $(window).scroll(function (){console.log($(window).scrollTop())};
1 里面获取的距离只显示一次 滚动完 刷新后才能更新,
2 里面的距离一直跟着滚动改变
why!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
The text was updated successfully, but these errors were encountered: