Bug Tracker

Opened 11 years ago

Closed 9 years ago

#3519 closed enhancement (worksforme)

Single callback after an animation with multiple elements

Reported by: jazzyjay Owned by:
Priority: minor Milestone: 1.3
Component: effects Version: 1.2.6
Keywords: animate callback Cc: jazzyjay, flesler
Blocked by: Blocking:

Description

It would be useful to have a single callback option after an animation. This would be an alternative to current callback which is executed pearch animated element. Single callback would be executed only once after elements have been animated.

Jay

Change History (5)

comment:1 Changed 11 years ago by flesler

Cc: jazzyjay flesler added
Component: eventfx
need: ReviewTest Case
Owner: brandon deleted

Can you provide 1 or more situations where this is needed ?

comment:2 Changed 11 years ago by jazzyjay

I needed this to display a progress indicator during animation. I have a hige table and I hide/display columns. This process can take few seconds (usually 1-2s) during which I would like to display an indicator that browser is still working. So the way I figured this could work would be:

  1. Show the progress indicator
  2. Execute .hide()/.show() on a number of selected elements
  3. Callback function after all elements have been processed hides the progress indicator

Thanks J.

comment:3 Changed 11 years ago by flesler

The animations should take the same amount of time, ending pretty much at the same time, at least for most cases.

For the test case, we need an html file with the needed html/js/css.

You can use this link to jQuery's source in the test case.

comment:4 Changed 11 years ago by jazzyjay

Hi,

The URL is: http://www.sharesmagazine.co.uk/ext/tables/

Speed of the animation is OK in FF3, Safari3, even IE7 but Opera 9.5 is incredibly slow. A progress indicator would be especially useful under these circumstances.

Thanks J.

comment:5 Changed 9 years ago by dmethvin

Resolution: worksforme
Status: newclosed

It seems like the current behavior is a benefit for this case. You could set a counter to the number of callbacks expected, then advance the progress bar by decrementing the counter on each callback.

Note: See TracTickets for help on using tickets.