When my page loads, I have a header that is positioned absolutely. I want to make it fixed at a certain point when scrolling, which works fine.
The issue arises when trying to add an effect to the header (such as displaying with a delay from the top) while using the position:fixed
property.
Here is the code:
CSS
.iaw-header {
position:absolute;
}
JS:
if (jQuery(window).scrollTop() >= 700) {
jQuery('.iaw-header').css('position','fixed');
});