thanks for the link, will check it out.
I have this now:
Code:
$(window).scroll(function(){
if ($(window).scrollTop() > 400){
$('#servicediv').css({position:'relative',top:400});
} else {
$('#servicediv').css({'top':30%});
}
});
It basically does what I want it to do. BUT the div that scrolls up ends after the text. I have a large bg image that cover up the site. but when the div scrolls up you can see that the image is revealed behind it. I dont know how to fix this. If I have height : 100% on the div it just scrolls upp way to much.
And I dont know what height to set because on other resolution it will look weird.
Any good advice? I think it still has to do with my script