Feature #4363: Fix menu on medium windows

This commit is contained in:
Daniel Molina committed 2016-03-18 19:13:11 +01:00
1 parent ee872c1658
commit c38e10e5cc
1 file changed
+26 -26
+26 -26
View File
@@ -58,29 +58,29 @@ define(function(require) {
});
});
// var prevWindowLarge = Foundation.utils.is_large_up();
//
// $(window).resize(function() {
// if(Foundation.utils.is_large_up()){
// $('#menu-wrapper').removeClass("menu-small");
//
// if(!prevWindowLarge){ // resizing from small to large, show menu
// _show();
// }
//
// prevWindowLarge = true;
// } else {
// $('#menu-wrapper').addClass("menu-small");
//
// if(prevWindowLarge){ // resizing from large to small, hide menu
// _hide();
// }
//
// prevWindowLarge = false;
// }
// });
//
// $(window).resize();
var prevWindowLarge = Foundation.MediaQuery.atLeast('large');
$(window).resize(function() {
if(Foundation.MediaQuery.atLeast('large')){
$('#menu-wrapper').removeClass("menu-small");
if(!prevWindowLarge){ // resizing from small to large, show menu
_show();
}
prevWindowLarge = true;
} else {
$('#menu-wrapper').addClass("menu-small");
if(prevWindowLarge){ // resizing from large to small, hide menu
_hide();
}
prevWindowLarge = false;
}
});
$(window).resize();
}
function _hide(){
@@ -96,8 +96,8 @@ define(function(require) {
}
function _entryClick(){
// if(!Foundation.utils.is_large_up()){
// _hide();
// }
if(!Foundation.MediaQuery.atLeast('large')){
_hide();
}
}
});