Scroll Sticky with jQuery

[javascript]
$(window).scroll(function() {
if ($(window).scrollTop() > 175 ) {
$(‘.hud’).css({‘position’ : ‘fixed’, ‘top’ : 0});
} else {
$(‘.hud’).css({‘position’ : ‘relative’, ‘top’ : ‘none’});
}
});
[/javascript]

Leave a Reply