Cireson Partners, Customers and Community members share your customizations and examples here to help benefit the community as a whole to earn Kudos and badges.
DISCLAIMER
All files and projects located here are provided and come "as-is" and without any warranty or support. Use at your own risk. Your use of Community Uploads is subject to our Terms of Use.
Cireson does not and will not support or maintain these enhancements, extensions, and scripts.
For Team Cireson uploads click here.
Custom menu subnav on click instead of hover
Disables the built-in slide out submenu when hovering on a menu item with a clickable one instead. Click to open and click again on the same menu item or another to close.
Tested with IE11, Chrome 55, Firefox 45 & Edge with portal 7.2.2016.1
I've attached the files needed in a zip archive. To install just drop the files in CustomSpace (merge custom.js if you have other stuff there already!)
Comments
Awesome!
Thanks Martin, that's perfect .
Much appreciated.
It's not obvious which nav items are links and which are menus (links have a URL in the status bar and they highlight on mouse-over, but users probably won't notice that). Could you add an symbol to the bottom-right of the nav icon to show it has subordinate items? Something like ">" I guess.
I had the same issue, but it seems to work as intended, now.
Thanks Tom, all working for me now.
IF (["INPUT","A","SELECT"]......
I use the code that I originally posted, but if anyone ever adds other controls into the menus, the above approach could help with that ("a" might cause issues, but you see where I am heading with this).
var ChangeToClickableSubnav = function () { $('#side_nav li.nav_trigger').hoverIntent({ // Overwrite stock hover functionality over: function () { }, out: function () { }, interval: 50, timeout: 50 }).click(function (e) { // Adding click functionality if (["INPUT"].indexOf(e.target.tagName) == -1) { var nav_timeout = 425, leftPos = 220; var $this = $(this); // Make sure that were not clicking on a menu already active if ($(window).width() > 999) {
...etc...
And I think you'll see where the closing bracket goes.
You may notice that I also took the first equation out of the if statement--you might want to add it back to yours (with the OR), if you have not already.