Asynchronously load .JS

Thought I remembered doing something like this some time ago…

But I just wanted to add a <script> tag to a page after it’s all done loading (with jQuery).

Reason being I have some google map api stuff and I don’t want to load the whole API when the page is first loaded (rather when a user clicks a button - then I want to load http://google.com/jsapi?key=12345, and a local script such as /js/gmap.js).

I thought $.script worked, but it seems not to…