Fixed navbar autohide after viewport resize

main
petergood 7 years ago
parent 0f699ece95
commit d71d19e23b

@ -3,18 +3,25 @@
/*globals ajaxify, config, utils, app, socket, NProgress*/
$(document).ready(function() {
var env = utils.findBootstrapEnvironment();
$(".navbar-fixed-top").autoHidingNavbar({
showOnBottom: false,
disableAutohide: true
});
setupNProgress();
setupTaskbar();
setupEditedByIcon();
setupMobileMenu();
setupQuickReply();
updateAutoHidingNavbar();
if (env === 'xs' || env ==='sm') {
$(".navbar-fixed-top").autoHidingNavbar({
showOnBottom: false
});
$(window).on('resize', function() {
updateAutoHidingNavbar();
});
function updateAutoHidingNavbar() {
var env = utils.findBootstrapEnvironment();
$(".navbar-fixed-top").autoHidingNavbar('setDisableAutohide', !(env === 'xs' || env ==='sm'));
}
function setupNProgress() {

Loading…
Cancel
Save