From 03f401a26cc78e42819277333902be7630d799ef Mon Sep 17 00:00:00 2001 From: Konstantin Pozin Date: Sat, 23 Apr 2011 10:47:30 -0400 Subject: [PATCH] Fixed the test page and the handler interfaces. Wrote more of the README. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 69bea5e..05c5946 100644 --- a/README.md +++ b/README.md @@ -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...); } }); @@ -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...); } }}); \ No newline at end of file