lorenz-w
12/20/2016 - 10:38 PM

function when scrolling

function when scrolling

jQuery(function ($) {
	$(document).scroll(function() {
    if ($(document).scrollTop() >=80) {
      // user scrolled 50 pixels or more > do stuff
      $('nav').addClass('fixed');
    } else {
      if ($(document).scrollTop() <=79) {
        $('nav').removeClass('fixed');
      }
    }
	});
});