I didn't understand why my changes on the primary-menu superfish initializiation was not being applied and I noticed that the classes are overlapping:
Drupal.behaviors.fusionSuperfish = function (context) {
$("#primary-menu ul.sf-menu").superfish({
hoverClass: 'sfHover',
delay: 250,
animation: {opacity:'show',height:'show'},
speed: 'fast',
autoArrows: false,
dropShadows: false,
disableHI: true
}).supposition();
};
Drupal.behaviors.fusionSuperfishBlocks = function (context) {
$("div.block ul.sf-menu").superfish({
hoverClass: 'sfHover',
delay: 250,
animation: {opacity:'show',height:'show'},
speed: 'fast',
autoArrows: false,
dropShadows: false,
disableHI: true
}).supposition();
};
Because primary-menu is also a div.block, and the second behavior is executed after the previous one, in reality the #primary-menu init is overridden. I know you could do any change you want on your theme, but it makes sense to have it properly on the core of this theme.
A proper fix would be to do something more specific to the second one, or to remove div.block from the primary-menu, but on my code, I did the following:
$("div.block ul.sf-menu").not('#primary-menu ul.sf-menu').superfish({
To the second bit.
Sorry not to have submitted a patch, no mind doing it although not sure the approach of fixing you'd like to do.
Comments
Comment #1
esmerel commentedComment #2
Poieo commentedClosing as won't fix since the D6 version is not getting any new development.