Created
July 17, 2013 17:48
-
-
Save arielcr/6022784 to your computer and use it in GitHub Desktop.
Embed script using javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Embed --> | |
<div id="my-embed-content"></div> | |
<script>(function(d, s, id) { | |
var my_account = 123; | |
var js, fjs = d.getElementsByTagName(s)[0]; | |
if (d.getElementById(id)) return; | |
js = d.createElement(s); js.id = id; | |
js.src = "//the.location.of/my/embed.js#acc="+my_account+"&w=900&h=700"; | |
fjs.parentNode.insertBefore(js, fjs); | |
}(document, 'script', 'my-embed'));</script> | |
<!-- /Embed --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment