I'm working on enhancing a question I recently published.
After scrolling down the page 200px, the image changes its size.
I'm also looking to implement additional functions that I'm struggling to make work.
Specifically, I want to achieve the following: 1) The background image should disappear when scrolling down the screen and reappear when scrolling back up.
Could this be easily accomplished?
Thank you for your assistance. Please check out my updated fiddle at http://jsfiddle.net/LLbAu/6/
$( 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',});
}
});