I have a clients website - www.stagecraft.co.uk and they want the navigation on the hire pages (longer page) to still be there at when you scroll the page down. I\'ve had a quic
You could make it position fixed, only when scrolling has reached a certain point:
$(window).scroll(function() {
if ($(this).scrollTop() > 200) { //I just used 200 for testing
$("#tester").css({ "position": "fixed", "top": 0 });
} else {
$("#tester").css({ "position": "absolute", "top": "200px" }); //same here
}
});
and the CSS for the div is as following:
#tester {
position: absolute;
right: 20px;
top: 200px;
height: 200px;
width: 100px;
background: red;
}