Here’s my second resuable script to hopefully find a home in the wild wild web… onViewable. Instead of duplicating all the details of the script here, please see it on it’s own page.
The jist of the script is that it’s a function that allows a snippet of code to be fired once an element is viewable on the screen.
We have a few longish type pages where I work and I wanted to use the Fade Anything Technique to do what it does best, and hilight a few elements on the page. Well a few of those elements were not viewable on the screen above the fold so I had to come up with something to make them fire when they were viewable. So long story short…I slapped together a few miscelaneous things I had laying around and onViewable was born.
Please find the details of the hows and why’s on the onViewable page. Any updates will be posted there, and I will mention them in the blog so you can be aware of them.
I look forward to any feedback.
I must give credit here (in addition to on the script’s page) to the great PPK (Peter-Paul Koch) of QuirksMode.org. Without his invaluable resource and a few functions I borrowed, this wouldn’t be here today. Thank you PPK for your great contribution to the community.