Similar to the functionality in the Pinterest app, I want my top navigation bar to slide up/down and at the same time have my bottom toolbar slide down/up when scrolling.
While I've successfully made my top navigation bar hide/show using the code provided below, I'm struggling to achieve the same effect with my bottom toolbar. Any guidance from experienced individuals in the field would be greatly appreciated as I am relatively new to this.
JQuery:
$(document).ready(function(){
var previousScroll = 0,
headerOrgOffset = $('#header').height();
$('#header-wrap').height($('#header').height());
$(window).scroll(function () {
var currentScroll = $(this).scrollTop();
if (currentScroll > headerOrgOffset) {
if (currentScroll > previousScroll) {
$('#header-wrap').slideUp();
} else {
$('#header-wrap').slideDown();
}
}
previousScroll = currentScroll;
}); });