Skip to main content
May 29, 2008
Question

Spry - Accordion

  • May 29, 2008
  • 1 reply
  • 463 views
Hi,

I'm building a menu for a website with the Spry accordion widget.
I want to open the accordion with a mouseOver-effect, but not close them with a mouseOver.

When I change:
quote:

Spry.Widget.Accordion.addEventListener(tab, "mouseover", function(e) { return self.onPanelTabMouseOver(e, panel); }, false);

into
quote:

Spry.Widget.Accordion.addEventListener(tab, "mouseover", function(e) { return self.onPanelTabClick(e, panel); }, false);


the accordion also closes with a mouseOver. Because of this, the accordion trips when you go from the first, to the second panel in the accordion. It openens/closes again, againd, and again.

What must I do to let the accordion open on mouseOver, but not close on mouseOver?

Sorry for any bad English 🙂
This topic has been closed for replies.

1 reply

Inspiring
May 30, 2008
ajaxfanc wrote:
> What must I do to let the accordion open on mouseOver, but not close on
> mouseOver?

Perhaps in the onPanelTabClick method you can comment out the else statement at the beginning of the method:

change:
if (panel != this.currentPanel)
this.openPanel(panel);
else
this.closePanel();

to:
if (panel != this.currentPanel)
this.openPanel(panel);
// else
// this.closePanel();



That seems to stop the panel from close on mouse over again.

Beyond that, Spry related question might be better asked in the Spry forum:
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=72&catid=602



--
Danilo Celic
http://blog.extensioneering.com/