Maximenu mobile and preventDefault

Replied by johnoatwork on topic Maximenu mobile and preventDefault

Posted 8 years 8 months ago #29259
Hi Ced,

Listening for clicks on menu item number class as you suggested works. I note the mobile menu still doesn't render the other link classes (eg the fontawsome classes) but I can insert them with CSS.

Thanks so much for your help with this. Love your work :)

Regards
John

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic Maximenu mobile and preventDefault

Posted 8 years 8 months ago #29260
cool ! thank you :)
yes the menu mobile does not take all the css classes to avoid some CSS conflicts

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Replied by johnoatwork on topic Maximenu mobile and preventDefault

Posted 8 years 6 months ago #30477
Hi Ced,

Back on this again :)


I've run into an issue with a third party service that is called using classes that are controlled by the service provider (AddThis).

I've tried a few approaches to make this work from the mobile menu but no luck so far. Is there any way to allow some classes to be passed through to the mobile menu?

Thanks
John

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic Maximenu mobile and preventDefault

Posted 8 years 6 months ago #30487
Hi
the only way is to modify the javascript, all the menu items are passed in the loop and only the needed informations are taken .Then here you can check for a class
CEd

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Replied by johnoatwork on topic Maximenu mobile and preventDefault

Posted 8 years 6 months ago #30549
Hi Ced,

I tried adding the classes back in document ready but of course it doesn't work because it runs before the mobile menu code. So I think I need to run some js after maximenumobile.js executes. I assume it's triggered by a screen resize event. Is this correct?

Thanks
John

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic Maximenu mobile and preventDefault

Posted 8 years 6 months ago #30554
The maximenu mobile is loaded on page load (dom ready). you could use a dom ready and a setInterval to check when the mobile menu is created, then execute your script. Just an idea :)

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Time to create page: 0.988 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 1046 guests and no members online