Skip to content

Commit

Permalink
fix: Solve the problem that the menu button is not displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyib committed Dec 25, 2019
1 parent 20881b7 commit c596944
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/js/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ $(document).ready(function () {
var $menuItem = $('.header-nav-menu > .header-nav-menu-item');
var $allSubmenu = $('.header-nav-submenu');
var isMenuShow = false;
var DESKTOP_WIDTH = 992 - 0.02;

function closeAllMenuItem () {
$menuItem.velocity({
Expand All @@ -11,7 +12,7 @@ $(document).ready(function () {
}

$(window).on('resize', function () {
if ($(this).width() > 992) {
if ($(this).width() > DESKTOP_WIDTH) {
if (!$menu.is(':visible')) {
$menu.css({ display: 'block', opacity: 1 });
}
Expand Down

0 comments on commit c596944

Please sign in to comment.