Closed (fixed)
Project:
OM Maximenu
Version:
7.x-1.23
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Nov 2011 at 05:47 UTC
Updated:
12 Nov 2011 at 13:10 UTC
I had to make the following edit in om_maximenu.utils.inc around line 740 to get lavalamp to stay on the parent menu item, rather than resetting to the far left and moving down:
$('ul#om-menu-" . $menu . "').lavaLamp({ speed: 700, target:'.om-leaf', container:'li' });
I have yet to figure out a way for the lavalamp to ALSO navigate the submenus, but this is at least acceptable whereas it wasn't previously.
Comments
Comment #1
mcaden commentedI've resolved a part of this. the main menu, and each sub-menu have their own lavaLamp. The only problem now is that the parent menu doesn't keep track of "active" for submenu items that are active. Not sure how I'm going to do that.
$out .= '<li id="om-leaf-' . $links['code'] . '-' . $key . '" class="' . om_maximenu_link_classes($content, $permission, $count, $total) . '">';at line 195 became:
$out .= '<li id="om-leaf-' . $links['code'] . '-' . $key . '" class="' . om_maximenu_link_classes($content, $permission, $count, $total, $maximenu_name) . '">';--------------------------------------------------------------
function om_maximenu_link_classes($content = array(), $permission = array(), $count = 0, $total = 0) {at line 544 became:
function om_maximenu_link_classes($content = array(), $permission = array(), $count = 0, $total = 0, $maximenu_name = '') {--------------------------------------------------------------
$out = "om-leaf";at line 577 became:
$out = "om-leaf $maximenu_name-om-leaf";--------------------------------------------------------------
$('ul#om-menu-" . $menu . "').lavaLamp({ speed: 700 });at line 740 became:
$('ul#om-menu-" . $menu . "').lavaLamp({ speed: 500, target:'." . $menu . "-om-leaf', container:'li' });Comment #2
danielhonrade commentedHi,
I can't replicate what you meant by messing on submenus, can you give me a screenshot or screencast video.
thanks,
daniel
Comment #3
danielhonrade commentedHi,
I think I got what you meant, just adding '.om-leaf' also works:
$bg_slide_js = "jQuery(document).ready(function($){ $('ul#om-menu-" . $menu . "').lavaLamp({ target: '.om-leaf', container: 'li', speed: 700 }); })";
Comment #4
danielhonrade commentedfixed on the latest version
Comment #5
danielhonrade commentedComment #5.0
danielhonrade commentedchanging speed back to original