views:

271

answers:

0

I'm having some serious trouble getting Suckerfish working well in Safari.

I'm using Suckerfish to create a dynamic horizontal drop down menu. The problem is basicly that Safari doesn't change the css class like it is supposed to when a person click a different sub-menu. This only works if the sub-menu has children, if not – the old sub menu is still displayed.

You can see it all in action here: http://www.kallegustafsson.com/

Example: In the menu (left side beneath the picture), click 'advertising', a new menu appears, click 'paul smith', a sub-menu appears. Then click 'baldessarini' – nothing happens. In Firefox and other browsers, the 'paul smith submenu' dissapears and 'baldessarini' goes bold.

As far as I know, this is the code:

     hideSuperfishUl : function(){
  var o = sf.op,
   not = (o.retainPath===true) ? o.$path : '';
  o.retainPath = false;
  var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
    .find('>ul').hide().css('visibility','hidden');
  o.onHide.call($ul);
  return this;
 },

And this code triggers it:

$('li:has(ul)',this).click(over).hover(function(){},out).each(function() {
   if (o.autoArrows) addArrow( $('>a:first-child',this) );
  })
  .not('.'+c.bcClass)
   .hideSuperfishUl();

Any help is extremely appreciated!