Is the callback on jQuery’s getScript() unreliable or am I doing something wrong?

I noticed the same issue with FF 3.6.

A solution is to load the script synchronously.

As mentioned in jQuery’s documentation, getScript is shorthand for:

$.ajax({
  url: url,
  dataType: 'script',
  success: success
});

Everything works fine if I use the following instead of getScript:

$.ajax({
  url: url,
  dataType: 'script',
  success: success,
  async: false
});

Leave a Comment