[thelist] onScroll event?

Christian Heilmann lists at onlinetools.org
Tue Dec 21 07:13:43 CST 2004


Andreas Wahlin wrote:

>Is there some way to detect when you scroll an element?
>Scenario is that I want dropshadow on the text of a div, so I just put
>in another div with a slight offset and ... drop shadow!
>Now, if the text in that div is large, there be scrollbars, and if
>clicked, the div obviously scrolls the text, leaving the dropshadow
>behind. 
>It could of course be solved by firing a setInterval and checknig the
>scrollTop attribute on the text div, and then apply that to the
>dropshadow div, but it would be nice to have a onScroll event or
>something .
>  
>
alistapart.com had some articles about CSS dropshadows. It seems to me 
that you  might be overcomplicating things. I don't really know how 
scrolling would leave the shadow layer behind.



More information about the thelist mailing list