Permalink
Browse files

whitespace is our enemy

  • Loading branch information...
1 parent 951e71b commit d4d51fefa62ad8c505146c2a2ff60ca0e91be730 @madrobby committed Dec 28, 2010
Showing with 5 additions and 5 deletions.
  1. +3 −3 src/ajax.js
  2. +1 −1 test/ajax.html
  3. +1 −1 test/fixtures/jsonp.js
View
6 src/ajax.js
@@ -3,7 +3,7 @@
var jsonpID = 0;
function empty() {}
-
+
$.ajaxJSONP = function(options){
var jsonpString;
jsonpString = 'jsonp' + ++jsonpID;
@@ -12,11 +12,11 @@
$(script).attr({ src: options.url.replace(/callback=\?/, 'callback=' + jsonpString) });
$('head').append(script);
};
-
+
$.ajax = function(options){
// { type, url, data, success, dataType, contentType }
options = options || {};
-
+
if (options.url && /callback=\?/.test(options.url))
return $.ajaxJSONP(options);
View
2 test/ajax.html
@@ -62,7 +62,7 @@
});
});
},
-
+
testAjaxGetJSONP: function(t){
t.pause();
$.getJSON('fixtures/jsonp.js?jsoncallback=?&timestamp='+(+new Date), function(data){
View
2 test/fixtures/jsonp.js
@@ -1 +1 @@
-jsonp1({"items":[]})
+jsonp1({"items":[]})

0 comments on commit d4d51fe

Please sign in to comment.