Skip to content

Commit

Permalink
Fixed issue with mobile menu when there is no main menu set.
Browse files Browse the repository at this point in the history
  • Loading branch information
dziudek committed Aug 6, 2015
1 parent 4f3b52b commit 7de6007
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions js/functions.js
Expand Up @@ -143,6 +143,11 @@ function portfolio_is_touch_device() {
var main_menu_container = main_menu.find('.menu-main-menu-container').first();
var submenu = jQuery('#menu-main-menu');

if(!submenu.length) {
main_menu_container = jQuery(main_menu.find('.nav-menu').first());
submenu = jQuery(main_menu_container.find('ul').first());
}

main_menu.click(function() {
if(jQuery(window).outerWidth() <= 720) {
if(main_menu.hasClass("opened")) {
Expand Down

0 comments on commit 7de6007

Please sign in to comment.