git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added in support for $.ajax jsonpCallback (allowing you to specify the name of the...
[jquery.git]
/
src
/
ajax.js
diff --git
a/src/ajax.js
b/src/ajax.js
index
568a75d
..
7c5c838
100644
(file)
--- a/
src/ajax.js
+++ b/
src/ajax.js
@@
-221,7
+221,7
@@
jQuery.extend({
// Build temporary JSONP function
if ( s.dataType === "json" && (s.data && jsre.test(s.data) || jsre.test(s.url)) ) {
// Build temporary JSONP function
if ( s.dataType === "json" && (s.data && jsre.test(s.data) || jsre.test(s.url)) ) {
- jsonp = "jsonp" + jsc++;
+ jsonp = s.jsonpCallback || ("jsonp" + jsc++);
// Replace the =? sequence both in the query string and the data
if ( s.data ) {
// Replace the =? sequence both in the query string and the data
if ( s.data ) {
@@
-235,7
+235,7
@@
jQuery.extend({
s.dataType = "script";
// Handle JSONP-style loading
s.dataType = "script";
// Handle JSONP-style loading
- window[ jsonp ] = function(tmp){
+ window[ jsonp ] = window[ jsonp ] || function(tmp){
data = tmp;
success();
complete();
data = tmp;
success();
complete();