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.. ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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/