I am trying to remove fixed class once user start scroll the page from the bottom of the window. Below is the code I have written. But it is working once the scroll bar reaches the top of the page
$(window).scroll(function() {
  if ($(this).scrollTop() > 1){
    $('.sticky-header').addClass('fixed');
  } else{
    $('.sticky-header').removeClass('fixed');
  }
});
 
    