Hmmm ...
When they (the jQuery UI team) called it "hoverintent" they may have (unintentionally) been slightly misleading.
"hoverintent" automatically brings to mind an association with (a) Brian Cherne's hoverintent plugin, and (b) jQuery's hover event, both of which have on/off capability.
Unfortunately, a better description for this particular bit of code might be "over-with-intent" ... because it's just not interested in what you might want to happen on mouseout of an accordion header. (And don't get me wrong, I'm
not
saying that it should be!)
The "hoverintent" special event code given with the Accordion example was built specifically for use in that scenario, ie. for inclusion with Accordion's
event
option, which is defined as
The event that accordion headers will react to in order to activate the associated panel
And I think that there is also a very good reason why no mention is made of using it with
collapsible
set to
true
, because it brings in problems with double activation ... which you can experience on your own demo page by moving into a header and
immediately clicking on it?
As you have already realised, the important words in the above definition are "
accordion headers" : and you have appropriately bound your mouseleave to the accordion itself, ie. take the mouse off the entire accordion and it collapses back to fully closed state (
collapsible:
true).
So ... modifying this hoverintent special event code is
not going to provide you with what you are after.
You might want to look into using the
hoverintent plugin for jQuery (although I am aware that it might not be as up-to-date as it could be, so you may need to consider some of the updates that have put forward for it)?