showing results for - "jquery onscroll sticky header"
Badis
31 Apr 2017
1$(window).scroll(function(){
2  var sticky = $('.sticky'),
3      scroll = $(window).scrollTop();
4
5  if (scroll >= 100) sticky.addClass('fixed');
6  else sticky.removeClass('fixed');
7});