Skip to main content

Search and Top Navigation

#2932 closed enhancement (fixed)

Opened June 02, 2008 03:27AM UTC

Closed September 18, 2008 10:39AM UTC

Last modified November 19, 2008 04:37AM UTC

Accordion event for start of animation

Reported by: nostrademons Owned by: paul
Priority: major Milestone: 1.6rc2
Component: ui.accordion Version: 1.5b4
Keywords: Cc:
Blocked by: Blocking:
Description

Could we get an event that's fired at the start of the accordion animation, instead of being fired as the animation completes like the existing accordionchange?

A couple use cases:

1.) Dynamically creating the contents of the accordion pane on-demand, in response to accordionchange events. Using the existing accordionchange event, this results in the animation being fired, then the contents being filled in after it completes. With a start event, the contents would be filled in first and then animated.

2.) Ensuring that an area of the screen is visible & properly setup whenever the appropriate accordion tab is open. For example, I have an event handler - triggered by something other than the accordion - that tries to activate a certain pane inside the accordion and then references components that are built only in response to that accordion pane being activated. Since accordionchange fires after the animation, it won't have executed when the call to accordion('activate') completes, and so the widgets I'm referencing in the event handler don't yet exist.

I've attached a patch that adds an 'accordionchangestart' event which fires before the animation (or before the 'accordionchange' event in the case of a non-animated accordion), which is adequate for my purposes and shouldn't disturb anything else.

Attachments (0)
Change History (7)

Changed June 02, 2008 03:30AM UTC by nostrademons comment:1

Attachment didn't work, I got a "Permission denied: '/opt/trac/attachments/ticket'" Trac error when adding it. The change was one line added to the beginning of toggle(), after the var declarations but before the options.running assignment:

$(this).triggerHandler("accordionchangestart", [options.data], options.change);

Changed June 26, 2008 07:44PM UTC by rdworth comment:2

milestone: 1.51.5.2

Changed July 10, 2008 08:48PM UTC by paul comment:3

milestone: 1.5.21.6b

Changed August 16, 2008 03:29PM UTC by Cloudream comment:4

milestone: 1.6b1.6
owner: joern.zaeffererpaul
status: newassigned

Changed September 18, 2008 10:39AM UTC by paul comment:5

resolution: → fixed
status: assignedclosed

Implemented in r692.

Changed October 31, 2008 02:12PM UTC by sunshine comment:6

Replying to [comment:5 paul]:

Implemented in r692.

Shouldn't this change be documented? Presently, documentation mentions only the end-of-animation accordionchange event.

Changed November 19, 2008 04:37AM UTC by rdworth comment:7

milestone: 1.61.6rc2