If you want to include external .js file in your custom module, create the following file.
external.js
(function ($) {
Drupal.behaviors.myModule = function(context) {
var externalScript = $('<script></script>').attr('type','text/javascript').attr('src', 'http://example.org/example.js');
$('body').append(externalScript);
}
}(jQuery));
Then whenever you want to add the http://example.org/example.js, add it by drupal_add_js().
drupal_add_js(drupal_get_path('module', '<module>') . '/external.js', 'module');
Done =)
Next: Drupal – Load External Javascript using drupal_add_js() @ 2

One thought on “Drupal – Load External Javascript using drupal_add_js() @ 1”