The title pretty much describe what my problem is, I need to add a class to a fixed nav but only when the browser is scrolling if the user is not scrolling remove that class.
I'm not sure why you'd do this, but check out this demo and code:
$(function() {
var timer, el = $('body'), flag = false; $(window).scroll(function() { if (!flag) { flag = true; el.addClass('scrolling'); } clearTimeout(timer); timer = setTimeout(function() { el.removeClass('scrolling'); flag = false; }, 200); });
Thanks in advance....
Alex