Skip to content
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.

Commit

Permalink
Fixed the test page and the handler interfaces. Wrote more of the REA…
Browse files Browse the repository at this point in the history
…DME.
  • Loading branch information
kpozin committed Apr 23, 2011
1 parent e564789 commit 64d9587
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ The plugin exposes the `onprogress` event in two ways:

### Global AJAX Event
As a [global AJAX event](http://docs.jquery.com/Ajax_Events#Global_Events) that you can subscribe to.

$("#loading").bind("ajaxProgress", function(jqEvent, progressEvent, jqXHR) {
if (progressEvent.lengthComputable) {
$(this).text("Loaded " + (Math.round(progressEvent.loaded / progressEvent.total * 100) / 100)) + "%";
Expand All @@ -29,7 +30,7 @@ As a [global AJAX event](http://docs.jquery.com/Ajax_Events#Global_Events) that

The handler signature is `function ( jqEvent, progressEvent, jqXHR )`, where `jqEvent` is the the event object created by
jQuery, `progressEvent` is the native object conforming to the
(ProgressEvent interface)[http://www.w3.org/TR/progress-events/#interface-progressevent], and `jqXHR` is the original
(wrapper around the XMLHttpRequest object)[http://api.jquery.com/jQuery.ajax/#jqXHR].
[ProgressEvent interface](http://www.w3.org/TR/progress-events/#interface-progressevent), and `jqXHR` is the original
[wrapper around the XMLHttpRequest object](http://api.jquery.com/jQuery.ajax/#jqXHR).

### Local AJAX Event

0 comments on commit 64d9587

Please sign in to comment.