It’s not like I’m going to post a random thing I found useful as a Gem-of-the-day every day, but let’s stick with often.
The first gem is this one:
Dynamic script loading this feature is called. Wow. Anyway, we use it at Javeline and I found it in the Mootools library - lots of cool stuff in there by the way.
Update: Added the eval fallback with its second argument telling eval to execute the code in the scope of the window object. (This is supported by Gecko browsers only)
Update2: Changed document.head reference to document.getElementsByTagName(”head”). (Thx Mors)