Search and Top Navigation
#4576 closed enhancement (fixed)
Opened June 03, 2009 02:00PM UTC
Closed August 11, 2009 01:53AM UTC
Last modified July 12, 2010 04:06PM UTC
Accordion 'Active' property not change'ing
Reported by: | margustiru | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.8 |
Component: | ui.accordion | Version: | 1.7.1 |
Keywords: | accordion active | Cc: | margus.tiru@gmail.com |
Blocked by: | Blocking: |
Description
Seems like accordion property 'Active' is not changing when accordion is changed (another item selected).
alert($("#accordion").accordion('option','active'));
returns always the active:index it was set initially! If nothing was set initially, it always returns null.
Code (from downloaded jQuery UI Example Page):
Accordion
$("#accordion").accordion({ header: "h3", active:1, change: function(event, ui) { alert($("#accordion").accordion('option','active'));
}});
Will return always 1
Accordion
$("#accordion").accordion({ header: "h3", change: function(event, ui) { alert($("#accordion").accordion('option','active'));
}});
Will return always null
Attachments (1)
Change History (6)
Changed June 03, 2009 03:22PM UTC by comment:1
Changed June 09, 2009 08:02AM UTC by comment:2
milestone: | TBD → 1.8 |
---|---|
priority: | major → minor |
type: | bug → enhancement |
Not sure if this is a valid issue: We handle all options as read-only. On the other hand, there should be a way to get the active panel, which is currently missing.
Changed August 11, 2009 01:53AM UTC by comment:3
resolution: | → fixed |
---|---|
status: | new → closed |
Fixed in r3044
Changed September 04, 2009 02:14PM UTC by comment:4
So this is fixed in trunk with milestone 1.8, nice.
but how do i get the current index of the current open accordion in 1.7.x?
you dont maintain support for bugs in 1.7.x?!
Changed November 16, 2009 08:00AM UTC by comment:5
I have the same question. Is it possible to fix this in the current release? Or should we use 1.8? Is it stable?
Changed January 19, 2010 12:43PM UTC by comment:6
From what I've seen, it looks like it's fixed.
I digged in ui.accordion and maybe corrected the bug by adding
o.active = this.headers.index(this.active[0]);
to line 271 in ui.accordion.js like that:
this.active = clickedIsActive ? $([]) : clicked;
o.active = this.headers.index(this.active[0]);
this._toggle(toShow, toHide, data, clickedIsActive, down);
hopefully it works...