开发者

Jquery Issue About ScrollTop coding

if($('html, body').scrollTop().val() > 50){
$("#scrolltop").css("display", "block");
};
开发者_如何转开发

Those're my codes, but of course don't work. How can I apply to it with "if" questioning.. ?


Im not quite sure what you mean.

Do you have an element "scrolltop" which you only want to display if the body has scrolled passed 50px?

If so, here is an example: http://jsfiddle.net/t52HN/4/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜