Raul Valverde
Raul Valverde

Reputation: 587

Accordion jquery ui error

I have a problem with jquery ui accordion I put the code that should work in theory but it seems I do something wrong.

$("#section ul").accordion({
    event: "mouseover",
    active: "#mainmenu",
    collapsible: false,
    autoHeight: false
}).mouseleave(function() {
    $(this).accordion('activate', "#mainmenu");
});

Example: http://jsfiddle.net/W6Exu/2/

Upvotes: 0

Views: 432

Answers (1)

wirey00
wirey00

Reputation: 33661

According to jQueryUI accordion docs, active accepts an integer (which is zero based) that should be open. So try

$("#section ul").accordion({
    event: "mouseover",
    active: 1,
    collapsible: false,
    autoHeight: false
}).mouseleave(function() {
    $(this).accordion('activate', "#mainmenu");
});

http://jsfiddle.net/W6Exu/3/

Upvotes: 1

Related Questions