Scroll Animation

Hi Guys,

A Animation should start when I scroll. But it doesn’t. Can someone help me ?

<script type="text/javascript">
    window.onscroll = function()
    {
    if( window.XMLHttpRequest ) {
        var relativePosition = document.documentElement.scrollTop / document.body.offsetHeight;
        if(relativePosition > 1.0){
            $('.privatearea').fadeOut(0);
        }       
    }

Thanks for help.

Can you include the HTML this is being applied to? Also, the script is incomplete as supplied. There’s at least one closing curly brace missing, the closing script tag, and possibly other code too.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.