Jump to content
thirty bees forum
  • 0

[Mobile] Open Menu instead of Sandwhich


Question

Posted (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 by Madbits

4 answers to this question

Recommended Posts

  • 1
Posted
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

  • Thanks 1
  • 0
Posted
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
Posted

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
Posted (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 by Madbits
  • Haha 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...