Scroll Sticky with jQuery

$(window).scroll(function() {
    if ($(window).scrollTop() > 175 ) {
        $('.hud').css({'position' : 'fixed', 'top' : 0});
    } else {
        $('.hud').css({'position' : 'relative', 'top' : 'none'});
    }
});

Leave a Reply