Bug Tracker

Modify

Ticket #3519 (closed enhancement: worksforme)

Opened 5 years ago

Last modified 3 years ago

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
Blocking: Blocked by:

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

comment:1 Changed 5 years ago by flesler

  • Cc jazzyjay, flesler added
  • need changed from Review to Test Case
  • Component changed from event to fx
  • Owner brandon deleted

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

comment:2 Changed 5 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 5 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 5 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 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to worksforme

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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.