Madbits Posted September 3, 2020 Posted September 3, 2020 (edited) I can't seem to find the piece of JS that handles the "display:block" / "display:none" for the ul("sf-menu clearfix menu-content"). I want to remove the initial "Meniu" menu and just greet users with the whole thing available. Edited September 3, 2020 by Madbits
1 zen Posted September 3, 2020 Posted September 3, 2020 44 minutes ago, Madbits said: I can't seem to find the piece of JS that handles the "display:block" / "display:none" for the ul("sf-menu clearfix menu-content"). I want to remove the initial "Meniu" menu and just greet users with the whole thing available. here is the JS piece you are looking for : function mobileInit() { categoryMenu.superfish('destroy'); $('.sf-menu').removeAttr('style'); mCategoryGrover.on('click', function(e) { $(this).toggleClass('active').parent().find('ul.menu-content').stop().slideToggle('medium'); return false; }); it's in blocktopmenu.js 1
0 Madbits Posted September 3, 2020 Author Posted September 3, 2020 1 hour ago, zen said: here is the JS piece you are looking for : function mobileInit() { categoryMenu.superfish('destroy'); $('.sf-menu').removeAttr('style'); mCategoryGrover.on('click', function(e) { $(this).toggleClass('active').parent().find('ul.menu-content').stop().slideToggle('medium'); return false; }); it's in blocktopmenu.js God damn, I kept looking out for the themes js files instead of the module. Cheers man!
0 zen Posted September 3, 2020 Posted September 3, 2020 It's super easy to find, just with a right click and inspect with firebug on the button, then it would show you the code and where it comes from, which file and the line number (of course you have to turn off CCC before). Quote God damn, I kept looking out for the themes js files instead of the module. Actually this is also in the theme folders, here : theme/js/modules/blocktopmenu/js/blocktopmenu.js Enjoy 🙂
0 Madbits Posted September 3, 2020 Author Posted September 3, 2020 (edited) 8 hours ago, zen said: It's super easy to find, just with a right click and inspect with firebug on the button, then it would show you the code and where it comes from, which file and the line number (of course you have to turn off CCC before). Actually this is also in the theme folders, here : theme/js/modules/blocktopmenu/js/blocktopmenu.js Enjoy 🙂 Aye, already modified a couple of modules before, but for somewhat reason this morning I couldn't even make out 1+1 if I had to. Kept looking through the global.js, oh well, such is life. Edit: Just realized you can check out the events happening in the DOM, dear fuck, I'm dum dum. Edit 2: Spelled DOM as doom. Beat me to it. Edited September 3, 2020 by Madbits 1
Question
Madbits
I can't seem to find the piece of JS that handles the "display:block" / "display:none" for the ul("sf-menu clearfix menu-content").
I want to remove the initial "Meniu" menu and just greet users with the whole thing available.
Edited by Madbits4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now