I’m trying to toggle an element based on the viewport and scrolling.
By using $(window).scroll(function().. I can fire an event when the user scrolls but how do I check whether you’re scrolled to the top in order to hide the element?
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.
In IE the property is
and in standards-based browsers the property is
Test for a value of 0 to hide your element.