Skip to content

Commit

Permalink
Update ajax.js
Browse files Browse the repository at this point in the history
?t=1&callback=
  • Loading branch information
givebest committed May 24, 2016
1 parent 334b17b commit 98babf1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function ajax(options) {
document.body.removeChild(script);
success(data);
}
script.src = url + (url.indexOf("?") > -1 ? "" : "?") + "callback=" + callback;
script.src = url + (url.indexOf("?") > -1 ? "&" : "?") + "callback=" + callback;
script.type = "text/javascript";
document.body.appendChild(script);
setTime(callback, script);
Expand Down Expand Up @@ -134,4 +134,4 @@ function ajax(options) {
} else {
createXHR();
}
}
}

0 comments on commit 98babf1

Please sign in to comment.