Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Errors were occuring with getScript, if you called it too early.

  • Loading branch information...
commit 4e504d86b9dc9e1501f598744f6c3b19f834c487 1 parent 97fe63c
@jeresig jeresig authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/ajax.js
View
5 src/ajax.js
@@ -214,6 +214,7 @@ jQuery.extend({
// Watch for a new set of requests
if ( s.global && ! jQuery.active++ )
jQuery.event.trigger( "ajaxStart" );
+
// If we're requesting a remote document
// and trying to load JSON or Script
if ( !s.url.indexOf("http") && s.dataType == "script" ) {
@@ -228,12 +229,12 @@ jQuery.extend({
// Attach handlers for all browsers
script.onload = script.onreadystatechange = function(){
if ( !done && (!this.readyState ||
- this.readyState == "loaded" || this.readyState == "complete") ) {
+ this.readyState == "loaded" || this.readyState == "complete") ) {
done = true;
success();
complete();
head.removeChild( script );
- }
+ }
};
}
Please sign in to comment.
Something went wrong with that request. Please try again.