[Moo] How to block setStyle function execution after clicking the menu item?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Moo] How to block setStyle function execution after clicking the menu item?

Борис Гаркун
Hello!

After the connection of mootools files to this site i've found that when you click some menu item with nested sumbmenu at the top horizontal navbar(bootstrap 3) and then click another main menu item (also having nested submenu items) you will see that the first parent menu item will disappear.
I've found that the Element.implement.setStyle function in mootools-core.js is hiding menu items. Here is the callstack to this function


Please help me to come up with how to block it's execution after click on some menu item with subitems

--

---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[Moo] Re: How to block setStyle function execution after clicking the menu item?

Борис Гаркун
I had to write such code
 $('header ul.navbar-nav li.dropdown a').on('click', function(){ if($(this).next().css("display")=="block"){ $(this).next().css("display", "none"); } else{ $(this).parent().parent().find("ul").css("display", "none"); $(this).next().css("display", "block"); } return false; });

and return false; was the most significant part of it;

--

---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.