i am trying to add some functionality to a question i recently posted.
once you scroll down the page 200px the image changes size.
I also want to add the following functions but cant get it to work.
1) when you scroll down the screen i want the background image to disappear but once you scroll back up the page i want it to reappear.
is this easily achieved???
thanks for your help. please update my fiddle.
$( window ).scroll(function() {
if($(window).scrollTop() > 200){
$("#profile-pic-bg img").css({
"position": "absolute",
"top": "20px",
"left":"5px" ,
"width":'50px'
});
}else{
$('#profile-pic-bg img').css({'width': '145px',});
}
});