Mobile Menu Icon not working
-
I am using Dream Way and the site is beautiful. I tested two mobile devices (iPhone 5c and Samsung Galaxy S5) and the menu icon is not working. The pull down menu does not appear. Tapping the icon doesn’t do anything. Is there a setting somewhere in the Customizer I need to activate?
Thanks for any help you can provide!
-
Hey mktoothman,
From what I can tell by the Theme’s preview you are not doing anything on click. I suggest doing something like below.
jQuery:
$('.menu-toggle').on('click', function () { var _this = $(this), container = _this.closest('.horisontal-navigation').find('.nav-horizontal'); container.find('ul').toggleClass('active'); });CSS:
.horisontal-navigation ul.nav-horizontal.active, .horisontal-navigation div.nav-horizontal > ul.active { display: block; }Thank you for this! Please forgive my ignorance, but which file exactly would I insert that code into?
- Download this plugin: https://wordpress.org/plugins/custom-css-js-php/
- Go to the “Add New JAVASCRIPT” area (screenshot)
- Add this code:
jQuery('.menu-toggle').on('click', function ($) { var _this = $(this), container = _this.closest('.horisontal-navigation').find('.nav-horizontal'); container.find('ul').toggleClass('active'); }); - Go to the “Add New CSS” area
- Add this code:
.horisontal-navigation ul.nav-horizontal.active, .horisontal-navigation div.nav-horizontal > ul.active { display: block; } - Save
Still not working. Here is the site: http://southall.loricagardenweb.com
Did I install the new JS and CSS correctly?
It asked if I wanted to apply using shortcode, wp_head, or wp_footer. I selected the default of “shortcode”. Should I be using one of the other options?
Try putting it into the
wp_footer– which means put it in the footerNope 🙁
Think I should try pasting it directly into the parent theme’s (SG Window) footer.php file?
I checked the website and it appears to be completely different from before, and the plugin doesn’t appear to be active.
Yes, I gave up on Dream Way and decided to go with a different template. I really liked the look of Dream Way better, though.
Oh, if in future you get back onto Dream Way could you post in its forum instead: https://wordpress.org/support/theme/dream-way#postform
This thread was posted in the ‘SG Window’ theme forum.
Thank you for your help. It is good to know about the Plugin you recommended, too. I did test the site with SG Window and it was having the same issue with the mobile menu not being clickable. So I think it might be a problem with that theme as the parent.
Hey mktoothman,
If you ever need help just shoot me a Private Message. I am always willing to help people that want to learn.
Same problem with the mobile window.
Not sure what to do.
http://www.reefinnovations.com
so I added:
Download this plugin: https://wordpress.org/plugins/custom-css-js-php/
Go to the “Add New JAVASCRIPT” area (screenshot)
Add this code:
jQuery(‘.menu-toggle’).on(‘click’, function ($) {
var _this = $(this),
container = _this.closest(‘.horisontal-navigation’).find(‘.nav-horizontal’);container.find(‘ul’).toggleClass(‘active’);
});
Go to the “Add New CSS” area
Add this code:
.horisontal-navigation ul.nav-horizontal.active,
.horisontal-navigation div.nav-horizontal > ul.active {
display: block;
}Still Not Working
corrected the spelling of horisontal-
Still Not WorkingI don’tthink that plugin works any more, try an alternative
The code that Anthony posted worked for me. Thanks, dude! I put the javascript into the navigation.js file in the sgwindow theme and the css into the style.css in the Dreamway theme. I want to move the script completely into the Dreamway theme, so that’s my next research project.
Hi there,
I’m still having this problem, tried to do this:
The code that Anthony posted worked for me. Thanks, dude! I put the javascript into the navigation.js file in the sgwindow theme and the css into the style.css in the Dreamway theme. I want to move the script completely into the Dreamway theme, so that’s my next research project.
But doesn’t work, I also saw that I have to assign a menu in the appearance->menu tab.
I only see ‘second top menu’ there. Can someone explain how to assign a menu so the mobile menu icon is working again?
The topic ‘Mobile Menu Icon not working’ is closed to new replies.
