Skip to content

Instantly share code, notes, and snippets.

@funkyboy
Created August 19, 2018 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save funkyboy/cf45dcc9354ad10484a5884f68b8c11b to your computer and use it in GitHub Desktop.
Save funkyboy/cf45dcc9354ad10484a5884f68b8c11b to your computer and use it in GitHub Desktop.
<div id="my-widget"></div>
<script src="https://mydomain.com/widget.js" type="text/javascript"></script>
(function() {
var widget = document.getElementById("my-widget");
widget.innerHTML = "<link type='text/css' href='https://mydomain.com/widget.css' rel='stylesheet'>" +
"<div class='my-content'>"+
"This is my content."+
"</div>";
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment