Skip to content

Instantly share code, notes, and snippets.

@mikisvaz
Created December 27, 2009 12:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikisvaz/264255 to your computer and use it in GitHub Desktop.
Save mikisvaz/264255 to your computer and use it in GitHub Desktop.
---
public/javascripts/culerity.js | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/public/javascripts/culerity.js b/public/javascripts/culerity.js
index 2db12c9..d12df5e 100644
--- a/public/javascripts/culerity.js
+++ b/public/javascripts/culerity.js
@@ -17,11 +17,15 @@ jQuery(function($) {
window.running_ajax_calls = 0;
var ajax_with_count = function(options) {
- window.running_ajax_calls += 1;
- options.success = count_down(options.success);
- options.error = count_down(options.error);
- original_ajax(options);
+ if (options.async == false){
+ return(original_ajax(options));
+ }else{
+ window.running_ajax_calls += 1;
+ options.success = count_down(options.success);
+ options.error = count_down(options.error);
+ original_ajax(options);
+ }
};
$.ajax = ajax_with_count;
-});
\ No newline at end of file
+});
--
1.6.5.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment