Basically I saw this page THIS PAGE and if you scroll up and down you can see the glass of drink becoming full and empty depeing on where your scrollbar is. Any idea how this is done?
Share
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.
It’s pretty complex to do stuff like that but not particularly hard.
First, you’ll need to manage this using something like jQuery. You got that already so good…
The html below is a working example that assumes the user has an image:

it is 700 x 100. The code is pretty simple. Round the window’s scrollTop() value and figure the right frame offset based on the results. No need to fully explain, the code below says it all.