Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Improved compatibility with jQuery 1.8

  • Loading branch information...
commit 2b03a7c02309060fd5fe46792d196d2d228b65ab 1 parent 2e64b35
Vojtěch Dobeš authored May 27, 2012

Showing 1 changed file with 7 additions and 10 deletions. Show diff stats Hide diff stats

  1. 17  nette.ajax.js
17  nette.ajax.js
@@ -89,16 +89,13 @@ var nette = function () {
89 89
 				var xhr = $.ajax({
90 90
 					url: $form ? $form.attr('action') : this.href,
91 91
 					data: data,
92  
-					type: $form ? $form.attr('method') : 'get',
93  
-					success: function (payload) {
94  
-						inner.fire('success', payload);
95  
-					},
96  
-					complete: function () {
97  
-						inner.fire('complete');
98  
-					},
99  
-					error: function () {
100  
-						inner.fire('error');
101  
-					}
  92
+					type: $form ? $form.attr('method') : 'get'
  93
+				}).done(function (payload) {
  94
+					inner.fire('success', payload);
  95
+				}).fail(function () {
  96
+					inner.fire('error');
  97
+				}).always(function () {
  98
+					inner.fire('complete');
102 99
 				});
103 100
 				inner.fire('start', xhr);
104 101
 			}

0 notes on commit 2b03a7c

Please sign in to comment.
Something went wrong with that request. Please try again.