View Single Post
Old 01-09-2013, 09:17 PM   PM User | #8
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,555
Thanks: 62
Thanked 4,054 Times in 4,023 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Well, I of course knew what the e is, but I don't see why he needs it for that code.

Why does he need to reference the triggering event when the code just does (now, as simplified):
Code:
<script type='text/javascript'>
var scrollPosition = document.body.scrollTop; // initial value
document.onscroll = 
    function( )
    {
        scrollPosition =  document.body.scrollTop;
    };
</script>
That's what *I* meant by "why is e there?" I don't see it being used, at all.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is online now   Reply With Quote