```
jQuery(window).scroll( function(){

    /* Check the location of element */
    jQuery('.logoscrollbg').each( function(i){

        var logo = jQuery(this).outerHeight();
        var position = jQuery(window).scrollTop();
        /* fade out */
        if( position > logo  ){

            jQuery(this).animate({'opacity':'1'},100);

        }else{ jQuery(this).animate({'opacity':'0'},100);}

    }); 

});

```

Above is my script for a class (the header) with should blend in when the page is being scrolled down and blend out when you are on the top of the page, with other words the start. 

I don't understand javascript at all, but I do a little `php` and I was wondering if someone could help me write there a `elseif` tag and later make the `els`e tag so that is the page is loaded the class(.logoscrollbg) isn't visible and when u start scrolling it gets visible and when you get to the top it gets invisivle again :) 

The script works like this right now: when I enter the site it shows the bar(bad), later when scrolling it stays or well is there(good), then when getting to top again it fades out(good).