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

mcaden’s picture

I'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' });

danielhonrade’s picture

Hi,

I can't replicate what you meant by messing on submenus, can you give me a screenshot or screencast video.

thanks,
daniel

danielhonrade’s picture

Hi,

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 }); })";

danielhonrade’s picture

Status: Needs review » Fixed

fixed on the latest version

danielhonrade’s picture

Status: Fixed » Closed (fixed)
danielhonrade’s picture

Issue summary: View changes

changing speed back to original