Keefer
Keefer

Reputation: 2289

jQuery UI Accordion - Close all if Not On "Active Page"

I'm using the jQuery UI Accordion with the navigation: true toggled. With that, URL's in the accordion determine which accordion portion is opened. If it doesn't match a URL, is there a way to have it close all accordions by default? I've got collapsible set to true.

    $( "#sidebarNav" ).accordion({ event: 'mouseover', autoHeight: false, navigation: true, collapsible: true });

Upvotes: 1

Views: 1009

Answers (1)

Doug Owings
Doug Owings

Reputation: 4448

In the accordion options, try

active: false

Upvotes: 2

Related Questions