Skip to content

Instantly share code, notes, and snippets.

View fortis's full-sized avatar
🎯
Focusing

Alan Bondarchuk fortis

🎯
Focusing
View GitHub Profile
@hagenburger
hagenburger / javascript_loader.js
Created July 30, 2010 15:28
Dynamically load JavaScript files with callback when finished
// Example:
JavaScript.load("/javascripts/something.js");
// With callback (that’s the good thing):
JavaScript.load("http://www.someawesomedomain.com/api.js", function() {
API.use(); // or whatever api.js provides ...
});