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 db83471 commit 03f401a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ You can set a handler on any jQuery selection in the DOM, and it will get trigge

$("#loading").bind("ajaxProgress", function(jqEvent, progressEvent, jqXHR) {
if (progressEvent.lengthComputable) {
$(this).text("Loaded " + (Math.round(progressEvent.loaded / progressEvent.total * 100) / 100)) + "%";
$(this).text("Loaded " + (Math.round(progressEvent.loaded / progressEvent.total * 100) / 100)) + "%");
} else {
$(this).text(Loading...)
$(this).text(Loading...);
}
});

Expand All @@ -42,9 +42,9 @@ object you pass to `jQuery.ajax()`.

$.ajax("/myfile", {progress: function(jqXHR, progressEvent) {
if (progressEvent.lengthComputable) {
console.log("Loaded " + (Math.round(progressEvent.loaded / progressEvent.total * 100) / 100)) + "%";
console.log("Loaded " + (Math.round(progressEvent.loaded / progressEvent.total * 100) / 100)) + "%");
} else {
console.log(Loading...)
console.log(Loading...);
}
}});

0 comments on commit 03f401a

Please sign in to comment.