concept progress in category jQuery

appears as: progress, progress
jQuery in Action, Third Edition

This is an excerpt from Manning's book jQuery in Action, Third Edition.

Method syntax: stop

stop([queue][, clearQueue[, goToEnd]])
Stops any animation that’s currently in progress for the elements in the jQuery object.
Parameters
queue (String) The name of the queue in which to stop animations (we’ll get to that shortly).
clearQueue (Boolean) If specified and set to true, stops not only the current animation but any other animations waiting in the animation queue. The default value is false.
goToEnd (Boolean) If specified and set to true, completes the current animation immediately (as opposed to merely stopping it). The default value is false.
Returns
The jQuery collection.

In addition to resolving or rejecting a Deferred, you can also give a notification about the progress of the process.

13.3.5. Follow the progress

With the methods discussed in the previous section, you can be notified about the progress of an asynchronous operation. But this is completely useless if you can’t “listen” for these updates. Enter the deferred.progress() method.

Method syntax: deferred.progress

deferred.progress(callbacks[, callbacks, ..., callbacks])
Add handlers that are called when the Deferred object generates progress notifications. This method accepts an arbitrary number of callbacks with a minimum of one.
Parameters
callbacks (Function|Array) A function or array of functions that is called when the Deferred object generates progress notifications.
Returns
The Deferred object.

Now that you know how this method works, let’s fix the idea with an example. Let’s say that you want to create an animation for a progress bar and you want to be able to keep track of the progress of the animation to display the percentage of completion. To do that you can use the deferred.progress() and the deferred.notify() methods.

jQuery UI in Action

This is an excerpt from Manning's book jQuery UI in Action.

4.5. Progressbar: displaying the progress of a task

Progressbar is another common UI element in desktop applications. When you install an application, your OS displays a bar indicating how far along in the process you are. When you download a file, your browser displays a bar that shows the progress.

Figure 6.2. A list of the easings provided by jQuery UI from http://api.jqueryui.com/easings/. Each graph plots the progress of the animation (the y-axis) against time (the x-axis). Clicking on each graph runs an animation with the corresponding easing. If you’re having trouble understanding easings, it’s worth taking a minute to run these; easings are far easier to understand visually.

F.5. Polyfilling <progress> with progressbar

Next, we’ll look at the <progress> element, which is an element that displays the progress of a task, much like the progressbar widget. The <progress> element has two custom attributes—max and value—that work exactly like the progressbar’s max and value options.