Next, I have this code:
// Function that hides / shows subnavbar according to scrolling
$('#view-2').scroll(function() {
var topo = $(this).scrollTop(); // = 0
if (topo > 0){
$('.subnavbar').fadeOut();
} else {
$('.subnavbar').fadeIn();
}
console.log(topo);
});
It works perfectly, but I wanted to make the navbar appear again with a scrollup (scrollUp)?
Could you help me with logic and solution?