# Asynchronously load .JS

**URL:** https://forum.kirupa.com/t/asynchronously-load-js/272002
**Category:** web dev
**Created:** [October 1, 2008, 8:26am UTC](https://forum.kirupa.com/t/asynchronously-load-js/272002 "2008-10-01T08:26:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Icy\_Penguin](https://avatars.discourse-cdn.com/v4/letter/i/f6c823/32.png) [@Icy\_Penguin](https://forum.kirupa.com/u/Icy_Penguin)
#### Post date: [October 1, 2008, 8:26am UTC](https://forum.kirupa.com/t/asynchronously-load-js/272002/1 "2008-10-01T08:26:48Z")

</div>

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](http://google.com/jsapi?key=12345), and a local script such as /js/gmap.js).

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