diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.accordion.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 33c3a8505..71e3b44b4 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -48,6 +48,10 @@ $.widget( "ui.accordion", { if ( !options.collapsible && options.active === false ) { options.active = 0; } + // handle negative values + if ( options.active < 0 ) { + options.active += this.headers.length; + } self.active = self._findActive( options.active ) .addClass( "ui-state-default ui-state-active" ) .toggleClass( "ui-corner-all" ) |