Check if nav has the sticky class before adding or removing it. Not checking causes severe framerate drops as addClass was called continuously during page scroll.