If the user is scrolling, I want to hide the navigation -
I am using (window).scroll and trying to make it into an if/else function with no luck.
Is .scroll not the right approach because it is a singular action?
$(document).ready(function(){
if $(window).scroll(function() {
$(".navbar").fadeOut(400);
}
else {
$(".navbar").fadeIn(400);
});
});