Answers for "how to get header height in jquery"

1

get header height jquery

var headerHeight = $('header').outerHeight();

$(window).scroll(function () {
    if ($(window).scrollTop() > headerHeight) { 
        $('#top_nav').slideDown("slow");
    }
    else{
        $('#top_nav').slideUp("fast");
    }
});
Posted by: Guest on February-24-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language