I am using some Javascript that is suppose to appear a certain id when you scroll to a certain point, it works and appears but when you scroll back up it doesn't stay rather it disappears.
Here is the Jsfiddle where it works - http://jsfiddle.net/rkerswell/jrpof73y/1/
And where it doesn't? - http://jsfiddle.net/rkerswell/t18m2tds/
Before you ask, I have copied the working code across above but that doesn't work. So if there is way to get it working using the second Jsfiddle then it should work. Any ideas?
This is also the Javascript as it is in my JS file.
$(function(){
var startY = 300;
$(window).scroll(function(){
checkY();
});
function checkY(){
if( $(window).scrollTop() > startY ){
$('#sketch-progress, #photoshop-progress, #illustrator-progress, #indesign-progress, #css-progress, #html-progress, #mac-progress, #windows-progress').slideDown();
}
else{
$('#sketch-progress, #photoshop-progress, #illustrator-progress, #indesign-progress, #css-progress, #html-progress, #mac-progress, #windows-progress').slideUp();
}
}
checkY();
});
It is just when it scrolls back up that I am having the problem. Anything im missing?