Ticket #4576 (closed enhancement: fixed)

Opened 10 months ago

Last modified 7 weeks ago

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@…

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

index.html (1.7 kB) - added by margustiru 10 months ago.
minimized jQuery UI Example Page

Change History

Changed 10 months ago by margustiru

minimized jQuery UI Example Page

Changed 10 months ago by margustiru

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...

Changed 9 months ago by joern.zaefferer

  • priority changed from major to minor
  • type changed from bug to enhancement
  • milestone changed from TBD to 1.8

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 7 months ago by rdworth

  • status changed from new to closed
  • resolution set to fixed

Fixed in r3044

Changed 6 months ago by andreas

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 4 months ago by haayman

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 2 months ago by djhenrock

Changed 2 months ago by crexland

Changed 2 months ago by rnbguru

From what I've seen, it looks like it's fixed. Hair Crimpers

Changed 7 weeks ago by john435

Thank you for posting such a useful website. Your weblog happens to be not just informative but also very stimulating too. There are a limited number of people who are capable of write technical articles that creatively. we are on the lookout for information regarding this topic. We ourselves went through several websites to find knowledge with regard to this.I will keep coming back !!

John mesothelioma and weight loss pills webmaster.

Note: See TracTickets for help on using tickets.