Regarding support for mouseover and delay, try this:
<script type="text/javascript">
<!--
//
// Create your accordion.
//
var Accordion1 = new Spry.Widget.Accordion("Accordion1");
//
// Attach mouse over behaviors.
//
attachMouseOverBehaviors(Accordion1);
//
// Utility functions to support mouse over delay.
//
gMouseOverDelay = 250; // msecs
function attachMouseOverBehaviors(acc)
{
var panels = acc.getPanels();
for (var i = 0; i < panels.length; i++)
{
var tab = acc.getPanelTab(panels[ i ]);
Spry.Widget.Accordion.addEventListener(tab, "mouseover",
getMouseOverFunc(acc, panels[ i ]), false);
Spry.Widget.Accordion.addEventListener(tab, "mouseout",
function(e)
{
if (acc.mouseOverTimerID)
clearTimeout(acc.mouseOverTimerID);
acc.mouseOverTimerID = 0;
}, false);
}
}
function getMouseOverFunc(acc, p)
{
return function(e) {
if (acc.mouseOverTimerID)
clearTimeout(acc.mouseOverTimerID);
acc.mouseOverTimerID = setTimeout(function() {
acc.mouseOverTimerID = 0; acc.openPanel(p); }, gMouseOverDelay);
};
}
//-->
</script>
Note that with the code above, you don't need to add
onmouseover and onmouseout attributes to your accordion markup. The
attachMouseOverBehaviors() will add the event handlers for you
programatically.
FYI, the functions were written to be compatible with both
the Spry 1.4 and 1.5 versions of the Accordion.
--== Kin ==--