Home › Support Forums › Theme Support › Mega Menu › Reply To: Mega Menu
Ok, thanks for your prompt response!!! I truly appreciate it.
It looks like his listed “First Fix” is supposed to remove the functionality – which is my intent. But, he says “when the window is enlarged.” I want the “More” menu item to not exist… A plus – instead of “More,” it would display the mobile nav. But that’s best case scenario. At the least, I just want “More” to go away.
His second fix is only to ADD the correct “working” menu functionality to the “More” function. I am only interested in removing this “More” function completely.
First fix – make the ‘More’ menu go away when the window is enlarged
Edit /wp-content/themes/enlightenment/js/call.js;
Find the line (around line 28) which looks like this:
if($(window).width() >= 768)
and change it to this:
if($(window).width() >= 768 && $(window).width() <= 1000)
Note: I used ‘1000’ because it works with my navbar. You may want to try another value if things don’t look right for you.
NOTE: This does not work.
Then, he adds further:
I missed out a couple of extra changes to /wp-content/themes/enlightenment/js/call.js:
Find the line which looks like this (it’s just above the first change we made):
enlightenment_trim_nav();
and change it to this:
if ($(window).width() <= 1000)
enlightenment_trim_nav();Again, you may want to change ‘1000’ to something else, depending on the width of your nav menu.
This doesn’t make sense to me, re: “just above the first change we made.” It seems like he is correcting himself by replacing the code correctly with this second post (and not, in fact, adding to the previous step). Again, this does not work to remove the “More” function. (He goes on to add JS functions, which seem to append more to his “Second Fix” for making the “More” menu work…)
Then, his “Second Fix”:
Second fix – make the ‘More’ menu work for submenus
Again, edit /wp-content/themes/enlightenment/js/call.js;
Find the two functions enlightenment_trim_nav and enlightenment_untrim_nav;
Replace them both with this code:
…….
I do not want the “More” menu to work for submenus, I don’t want it to show up at all. So I believe his Second Fix does not apply here.
Maybe I am missing something simple? Probably. Again – I tried changing the “Window width” value in call.js, and it does not remove the “More” function….
Your help is ENORMOUSLY appreciated! If you can explain how to “remove a JavaScript function that disables that functionality” – that’d be great. Thank you so much!
– Paul